1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
return {
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
config = function()
-- Mason
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "pyright", "clangd" },
})
-- Pyright
vim.lsp.config("pyright", {
settings = {
python = {
analysis = {
autoSearchPaths = true,
typeCheckingMode = "basic",
},
},
},
})
-- Clangd
vim.lsp.config("clangd", {
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--header-insertion=never",
"--completion-style=detailed",
"--function-arg-placeholders=true",
},
})
-- Enable servers
vim.lsp.enable("pyright")
vim.lsp.enable("clangd")
end,
}
|