chore: move from plugins.lsp to lsp

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2025-09-30 11:00:39 +02:00
parent c713ad013b
commit 97d05fbeba
Signed by: lander
GPG key ID: 0142722B4B0C536F

View file

@ -16,180 +16,139 @@ in
lspsaga = { lspsaga = {
enable = true; enable = true;
}; };
lsp = {
enable = true;
inlayHints = true;
servers = {
html = {
enable = true;
};
lua_ls = {
enable = true;
};
nil_ls = {
enable = true;
};
ts_ls = {
enable = true;
};
marksman = {
enable = true;
};
pyright = {
enable = true;
};
gopls = {
enable = true;
};
terraformls = {
enable = true;
settings = {
terraform.path = "${pkgs.opentofu}/bin/tofu";
};
};
jsonls = {
enable = true;
};
hls = {
enable = true;
installGhc = true;
};
rubocop = {
enable = true;
};
ruby_lsp = {
enable = true;
};
texlab = {
enable = true;
};
puppet = {
enable = true;
package = puppet-editor-services;
cmd = [
"${puppet-editor-services}/bin/puppet-languageserver"
"--stdio"
];
};
helm_ls = {
enable = true;
extraOptions = {
settings = {
"helm_ls" = {
yamlls = {
path = "${pkgs.yaml-language-server}/bin/yaml-language-server";
};
};
};
};
};
yamlls = {
enable = true;
extraOptions = {
settings = {
yaml = {
format = {
singleQuote = true;
};
schemas = {
kubernetes = "'*.yaml";
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" =
"*docker-compose*.{yml,yaml}";
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" =
"*flow*.{yml,yaml}";
};
};
};
};
};
};
keymaps = {
silent = true;
lspBuf = {
gd = {
action = "definition";
desc = "Goto Definition";
};
gr = {
action = "references";
desc = "Goto References";
};
gD = {
action = "declaration";
desc = "Goto Declaration";
};
gI = {
action = "implementation";
desc = "Goto Implementation";
};
gT = {
action = "type_definition";
desc = "Type Definition";
};
K = {
action = "hover";
desc = "Hover";
};
"<leader>cw" = {
action = "workspace_symbol";
desc = "Workspace Symbol";
};
"<leader>cr" = {
action = "rename";
desc = "Rename";
};
};
diagnostic = {
"<leader>cd" = {
action = "open_float";
desc = "Line Diagnostics";
};
"[d" = {
action = "goto_next";
desc = "Next Diagnostic";
};
"]d" = {
action = "goto_prev";
desc = "Previous Diagnostic";
};
};
};
};
}; };
extraPlugins = with pkgs.vimPlugins; [ lsp = {
ansible-vim servers = {
vim-puppet html = {
]; enable = true;
};
extraConfigLua = '' lua_ls = {
local _border = "rounded" enable = true;
};
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( nil_ls = {
vim.lsp.handlers.hover, { enable = true;
border = _border };
} ts_ls = {
) enable = true;
};
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( marksman = {
vim.lsp.handlers.signature_help, { enable = true;
border = _border };
} pyright = {
) enable = true;
};
vim.diagnostic.config{ gopls = {
float={border=_border} enable = true;
};
terraformls = {
enable = true;
settings = {
terraform.path = "${pkgs.opentofu}/bin/tofu";
};
};
jsonls = {
enable = true;
};
hls = {
enable = true;
installGhc = true;
};
rubocop = {
enable = true;
};
ruby_lsp = {
enable = true;
};
texlab = {
enable = true;
};
puppet = {
enable = true;
package = puppet-editor-services;
cmd = [
"${puppet-editor-services}/bin/puppet-languageserver"
"--stdio"
];
};
helm_ls = {
enable = true;
extraOptions = {
settings = {
"helm_ls" = {
yamlls = {
path = "${pkgs.yaml-language-server}/bin/yaml-language-server";
};
};
};
};
};
yamlls = {
enable = true;
settings = {
yaml = {
format = {
singleQuote = true;
};
schemas = {
kubernetes = "'*.yaml";
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" =
"*docker-compose*.{yml,yaml}";
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" =
"*flow*.{yml,yaml}";
};
};
};
};
}; };
require('lspconfig.ui.windows').default_options = { keymaps = [
border = _border {
} key = "gd";
''; lspBufAction = "definition";
desc = "Goto Definition";
}
{
key = "gr";
lspBufAction = "references";
desc = "Goto References";
}
{
key = "gD";
lspBufAction = "declaration";
desc = "Goto Declaration";
}
{
key = "gI";
lspBufAction = "implementation";
desc = "Goto Implementation";
}
{
key = "gT";
lspBufAction = "type_definition";
desc = "Type Definition";
}
{
key = "K";
lspBufAction = "hover";
desc = "Hover";
}
{
key = "<leader>cw";
lsbBufAction = "workspace_symbol";
desc = "Workspace Symbol";
}
{
key = "<leader>cr";
lspBufAction = "rename";
desc = "Rename";
}
];
};
} }