From 781856e48de303d6024537b3394abfc3e271b5df Mon Sep 17 00:00:00 2001 From: Eduardo Cueto-Mendoza Date: Fri, 20 Sep 2024 11:24:45 +0100 Subject: [PATCH] Modified pycodestyle to use 110 lenght --- after/plugin/lsp.lua | 78 +++++++++++++++++++++++++++++++++++++++++-- lua/eddie/options.lua | 2 +- 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 1d43601..be96dd5 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -173,7 +173,31 @@ then require('lspconfig').ocamllsp.setup({}) - require('lspconfig').pylsp.setup({}) + require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, + } require('lspconfig').rust_analyzer.setup({ settings = { @@ -196,7 +220,31 @@ then require('lspconfig').ocamllsp.setup({}) - require('lspconfig').pylsp.setup({}) + require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, + } require('lspconfig').rust_analyzer.setup({ settings = { @@ -275,7 +323,31 @@ then require('lspconfig').ocamllsp.setup({}) - require('lspconfig').pylsp.setup({}) + require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, + } require('lspconfig').rust_analyzer.setup({ settings = { diff --git a/lua/eddie/options.lua b/lua/eddie/options.lua index f00eb68..6e1262a 100644 --- a/lua/eddie/options.lua +++ b/lua/eddie/options.lua @@ -49,7 +49,7 @@ then vim.opt.updatetime = 50 - vim.opt.colorcolumn = "80" + vim.opt.colorcolumn = "110" -- LSP options vim.diagnostic.config({