Skip to content

Commit 1bcacbf

Browse files
committed
fix: Setting LSP config correctly.
ref: nvim-lua#1475 nvim-lua#1475
1 parent d300c9a commit 1bcacbf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

init.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,21 @@ 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 = {
691+
enabled = true,
692+
args = { '--rcfile', '/home/youruser/yourproject/.pylintrc' },
693+
},
694+
pycodestyle = { enabled = false },
695+
pyflakes = { enabled = false },
696+
flake8 = { enabled = false },
697+
},
698+
},
699+
},
700+
},
686701

687702
lua_ls = {
688703
-- cmd = { ... },
@@ -733,6 +748,14 @@ require('lazy').setup({
733748
end,
734749
},
735750
}
751+
-- NOTE: fix is found in this issue; https://github.com/nvim-lua/kickstart.nvim/pull/1475/files
752+
-- Installed LSPs are configured and enabled automatically with mason-lspconfig
753+
-- The loop below is for overriding the default configuration of LSPs with the ones in the servers table
754+
for server_name, config in pairs(servers) do
755+
vim.lsp.config(server_name, config)
756+
end
757+
-- 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
758+
-- These servers will have to be manually set up with require("lspconfig").server_name.setup{}
736759
end,
737760
},
738761

0 commit comments

Comments
 (0)