chore: move from plugins.lsp to lsp
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
c713ad013b
commit
97d05fbeba
1 changed files with 132 additions and 173 deletions
|
|
@ -16,9 +16,8 @@ in
|
||||||
lspsaga = {
|
lspsaga = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
|
||||||
inlayHints = true;
|
|
||||||
servers = {
|
servers = {
|
||||||
html = {
|
html = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -85,7 +84,6 @@ in
|
||||||
};
|
};
|
||||||
yamlls = {
|
yamlls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraOptions = {
|
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
yaml = {
|
||||||
format = {
|
format = {
|
||||||
|
|
@ -109,87 +107,48 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
keymaps = {
|
keymaps = [
|
||||||
silent = true;
|
{
|
||||||
lspBuf = {
|
key = "gd";
|
||||||
gd = {
|
lspBufAction = "definition";
|
||||||
action = "definition";
|
|
||||||
desc = "Goto Definition";
|
desc = "Goto Definition";
|
||||||
};
|
}
|
||||||
gr = {
|
{
|
||||||
action = "references";
|
key = "gr";
|
||||||
|
lspBufAction = "references";
|
||||||
desc = "Goto References";
|
desc = "Goto References";
|
||||||
};
|
}
|
||||||
gD = {
|
{
|
||||||
action = "declaration";
|
key = "gD";
|
||||||
|
lspBufAction = "declaration";
|
||||||
desc = "Goto Declaration";
|
desc = "Goto Declaration";
|
||||||
};
|
}
|
||||||
gI = {
|
{
|
||||||
action = "implementation";
|
key = "gI";
|
||||||
|
lspBufAction = "implementation";
|
||||||
desc = "Goto Implementation";
|
desc = "Goto Implementation";
|
||||||
};
|
}
|
||||||
gT = {
|
{
|
||||||
action = "type_definition";
|
key = "gT";
|
||||||
|
lspBufAction = "type_definition";
|
||||||
desc = "Type Definition";
|
desc = "Type Definition";
|
||||||
};
|
}
|
||||||
K = {
|
{
|
||||||
action = "hover";
|
key = "K";
|
||||||
|
lspBufAction = "hover";
|
||||||
desc = "Hover";
|
desc = "Hover";
|
||||||
};
|
}
|
||||||
"<leader>cw" = {
|
{
|
||||||
action = "workspace_symbol";
|
key = "<leader>cw";
|
||||||
|
lsbBufAction = "workspace_symbol";
|
||||||
desc = "Workspace Symbol";
|
desc = "Workspace Symbol";
|
||||||
};
|
}
|
||||||
"<leader>cr" = {
|
{
|
||||||
action = "rename";
|
key = "<leader>cr";
|
||||||
|
lspBufAction = "rename";
|
||||||
desc = "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
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue