moved lsp server config to after dir
This commit is contained in:
parent
23dd1811ee
commit
df0db24702
7
after/lsp/basedpyright.lua
Normal file
7
after/lsp/basedpyright.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
basedpyright = {
|
||||||
|
typeCheckingMode = 'standard',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
21
after/lsp/clangd.lua
Normal file
21
after/lsp/clangd.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
cmd = {
|
||||||
|
'clangd',
|
||||||
|
'--compile-commands-dir=build_nvim',
|
||||||
|
'--query-driver',
|
||||||
|
'/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*',
|
||||||
|
'--clang-tidy',
|
||||||
|
'--background-index',
|
||||||
|
'--use-dirty-headers',
|
||||||
|
'--completion-style=detailed',
|
||||||
|
},
|
||||||
|
root_markers = {
|
||||||
|
'.clangd',
|
||||||
|
'.clang-tidy',
|
||||||
|
'.clang-format',
|
||||||
|
'compile_flags.txt',
|
||||||
|
'configure.ac',
|
||||||
|
'.git',
|
||||||
|
'build_nvim',
|
||||||
|
},
|
||||||
|
}
|
22
after/lsp/lua_ls.lua
Normal file
22
after/lsp/lua_ls.lua
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
callSnippet = 'Replace',
|
||||||
|
},
|
||||||
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
disable = { 'missing-fields' },
|
||||||
|
},
|
||||||
|
format = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
7
after/lsp/yamlls.lua
Normal file
7
after/lsp/yamlls.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
validate = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -41,74 +41,21 @@ return {
|
|||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
local servers = {
|
local servers = {
|
||||||
basedpyright = {
|
'basedpyright',
|
||||||
settings = {
|
'ruff',
|
||||||
basedpyright = {
|
'clangd',
|
||||||
typeCheckingMode = 'standard',
|
'lua_ls',
|
||||||
},
|
'jsonls',
|
||||||
},
|
'dockerls',
|
||||||
},
|
'yamlls',
|
||||||
ruff = {},
|
'neocmake',
|
||||||
clangd = {
|
'markdown_oxide',
|
||||||
cmd = {
|
'taplo',
|
||||||
'clangd',
|
|
||||||
'--compile-commands-dir=build_nvim',
|
|
||||||
'--query-driver',
|
|
||||||
'/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*',
|
|
||||||
'--clang-tidy',
|
|
||||||
'--background-index',
|
|
||||||
'--use-dirty-headers',
|
|
||||||
'--completion-style=detailed',
|
|
||||||
},
|
|
||||||
root_markers = {
|
|
||||||
'.clangd',
|
|
||||||
'.clang-tidy',
|
|
||||||
'.clang-format',
|
|
||||||
'compile_flags.txt',
|
|
||||||
'configure.ac',
|
|
||||||
'.git',
|
|
||||||
'build_nvim',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lua_ls = {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
callSnippet = 'Replace',
|
|
||||||
},
|
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
disable = { 'missing-fields' },
|
|
||||||
},
|
|
||||||
format = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
jsonls = {},
|
|
||||||
dockerls = {},
|
|
||||||
yamlls = {
|
|
||||||
settings = {
|
|
||||||
yaml = {
|
|
||||||
validate = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
neocmake = {},
|
|
||||||
markdown_oxide = {},
|
|
||||||
taplo = {},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = vim.tbl_keys(servers or {}),
|
ensure_installed = servers,
|
||||||
})
|
})
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
@ -117,10 +64,7 @@ return {
|
|||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
for server, settings in pairs(servers) do
|
vim.lsp.enable(servers)
|
||||||
vim.lsp.config(server, settings)
|
|
||||||
vim.lsp.enable(server)
|
|
||||||
end
|
|
||||||
|
|
||||||
local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true })
|
local lsp_group = vim.api.nvim_create_augroup('UserLspAttach', { clear = true })
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user