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({