2024-03-24 18:02:32 +00:00
|
|
|
return {
|
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
opts = {
|
|
|
|
servers = {
|
|
|
|
nil_ls = {
|
|
|
|
settings = {
|
|
|
|
["nil"] = {
|
|
|
|
formatting = {
|
|
|
|
command = { "nixpkgs-fmt" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-03-25 19:33:52 +00:00
|
|
|
rust_analyzer = {
|
|
|
|
settings = {
|
|
|
|
["rust_analyzer"] = {
|
|
|
|
check = {
|
|
|
|
command = "clippy",
|
|
|
|
},
|
|
|
|
completion = {
|
|
|
|
fullFunctionSignatures = {
|
|
|
|
enable = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
diagnostics = {
|
|
|
|
styleLints = {
|
|
|
|
enable = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
imports = {
|
|
|
|
granularity = {
|
|
|
|
enforce = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-03-26 12:04:17 +00:00
|
|
|
jsonls = {
|
|
|
|
-- lazy-load schemastore when needed
|
|
|
|
on_new_config = function(new_config)
|
|
|
|
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
|
|
|
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
|
|
|
end,
|
|
|
|
settings = {
|
|
|
|
json = {
|
|
|
|
format = {
|
|
|
|
enable = true,
|
|
|
|
},
|
|
|
|
validate = { enable = true },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
marksman = {},
|
|
|
|
ruff_lsp = {
|
|
|
|
keys = {
|
|
|
|
{
|
|
|
|
"<leader>co",
|
|
|
|
function()
|
|
|
|
vim.lsp.buf.code_action({
|
|
|
|
apply = true,
|
|
|
|
context = {
|
|
|
|
only = { "source.organizeImports" },
|
|
|
|
diagnostics = {},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
desc = "Organize Imports",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-04-15 17:00:14 +00:00
|
|
|
hls = {},
|
2024-03-24 18:02:32 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|