Skip to content

Commit fdacca8

Browse files
committed
fix: Setting LSP config correctly.
* Only use pylint as the pylsp's linter. ref: nvim-lua#1475 nvim-lua#1475
1 parent d300c9a commit fdacca8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

init.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,18 @@ require('lazy').setup({
683683
-- But for many setups, the LSP (`ts_ls`) will work just fine
684684
-- ts_ls = {},
685685
--
686+
pylsp = {
687+
settings = {
688+
pylsp = {
689+
plugins = {
690+
pylint = { enabled = true },
691+
pycodestyle = { enabled = false },
692+
pyflakes = { enabled = false },
693+
flake8 = { enabled = false },
694+
},
695+
},
696+
},
697+
},
686698

687699
lua_ls = {
688700
-- cmd = { ... },
@@ -733,6 +745,14 @@ require('lazy').setup({
733745
end,
734746
},
735747
}
748+
-- NOTE: fix is found in this issue; https://github.com/nvim-lua/kickstart.nvim/pull/1475/files
749+
-- Installed LSPs are configured and enabled automatically with mason-lspconfig
750+
-- The loop below is for overriding the default configuration of LSPs with the ones in the servers table
751+
for server_name, config in pairs(servers) do
752+
vim.lsp.config(server_name, config)
753+
end
754+
-- NOTE: Some servers may require an old setup until they are updated. For the full list refer here: https://github.com/neovim/nvim-lspconfig/issues/3705
755+
-- These servers will have to be manually set up with require("lspconfig").server_name.setup{}
736756
end,
737757
},
738758

0 commit comments

Comments
 (0)