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
{
plugins = {
lspconfig = {
enable = true;
};
lsp-lines = {
enable = true;
};
@ -16,9 +19,8 @@ in
lspsaga = {
enable = true;
};
};
lsp = {
enable = true;
inlayHints = true;
servers = {
html = {
enable = true;
@ -52,7 +54,6 @@ in
};
hls = {
enable = true;
installGhc = true;
};
rubocop = {
enable = true;
@ -66,14 +67,13 @@ in
puppet = {
enable = true;
package = puppet-editor-services;
cmd = [
settings.cmd = [
"${puppet-editor-services}/bin/puppet-languageserver"
"--stdio"
];
};
helm_ls = {
enable = true;
extraOptions = {
settings = {
"helm_ls" = {
yamlls = {
@ -82,10 +82,8 @@ in
};
};
};
};
yamlls = {
enable = true;
extraOptions = {
settings = {
yaml = {
format = {
@ -109,87 +107,40 @@ in
};
};
};
};
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; [
ansible-vim
vim-puppet
keymaps = [
{
key = "gd";
lspBufAction = "definition";
}
{
key = "gr";
lspBufAction = "references";
}
{
key = "gD";
lspBufAction = "declaration";
}
{
key = "gI";
lspBufAction = "implementation";
}
{
key = "gT";
lspBufAction = "type_definition";
}
{
key = "K";
lspBufAction = "hover";
}
{
key = "<leader>cw";
lspBufAction = "workspace_symbol";
}
{
key = "<leader>cr";
lspBufAction = "rename";
}
];
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
}
'';
}