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 6007748e17
Signed by: lander
GPG key ID: 0142722B4B0C536F

View file

@ -4,6 +4,9 @@ let
in in
{ {
plugins = { plugins = {
lspconfig = {
enable = true;
};
lsp-lines = { lsp-lines = {
enable = true; enable = true;
}; };
@ -16,9 +19,8 @@ in
lspsaga = { lspsaga = {
enable = true; enable = true;
}; };
};
lsp = { lsp = {
enable = true;
inlayHints = true;
servers = { servers = {
html = { html = {
enable = true; enable = true;
@ -52,7 +54,6 @@ in
}; };
hls = { hls = {
enable = true; enable = true;
installGhc = true;
}; };
rubocop = { rubocop = {
enable = true; enable = true;
@ -66,14 +67,13 @@ in
puppet = { puppet = {
enable = true; enable = true;
package = puppet-editor-services; package = puppet-editor-services;
cmd = [ settings.cmd = [
"${puppet-editor-services}/bin/puppet-languageserver" "${puppet-editor-services}/bin/puppet-languageserver"
"--stdio" "--stdio"
]; ];
}; };
helm_ls = { helm_ls = {
enable = true; enable = true;
extraOptions = {
settings = { settings = {
"helm_ls" = { "helm_ls" = {
yamlls = { yamlls = {
@ -82,10 +82,8 @@ in
}; };
}; };
}; };
};
yamlls = { yamlls = {
enable = true; enable = true;
extraOptions = {
settings = { settings = {
yaml = { yaml = {
format = { format = {
@ -109,87 +107,40 @@ in
}; };
}; };
}; };
};
keymaps = { keymaps = [
silent = true; {
lspBuf = { key = "gd";
gd = { lspBufAction = "definition";
action = "definition"; }
desc = "Goto Definition"; {
}; key = "gr";
gr = { lspBufAction = "references";
action = "references"; }
desc = "Goto References"; {
}; key = "gD";
gD = { lspBufAction = "declaration";
action = "declaration"; }
desc = "Goto Declaration"; {
}; key = "gI";
gI = { lspBufAction = "implementation";
action = "implementation"; }
desc = "Goto Implementation"; {
}; key = "gT";
gT = { lspBufAction = "type_definition";
action = "type_definition"; }
desc = "Type Definition"; {
}; key = "K";
K = { lspBufAction = "hover";
action = "hover"; }
desc = "Hover"; {
}; key = "<leader>cw";
"<leader>cw" = { lspBufAction = "workspace_symbol";
action = "workspace_symbol"; }
desc = "Workspace Symbol"; {
}; key = "<leader>cr";
"<leader>cr" = { lspBufAction = "rename";
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; [
ansible-vim
vim-puppet
]; ];
extraConfigLua = ''
local _border = "rounded"
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config{
float={border=_border}
}; };
require('lspconfig.ui.windows').default_options = {
border = _border
}
'';
} }