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
44708547d9
1 changed files with 134 additions and 173 deletions
|
|
@ -16,9 +16,8 @@ in
|
|||
lspsaga = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
html = {
|
||||
enable = true;
|
||||
|
|
@ -111,85 +110,47 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
keymaps = [
|
||||
{
|
||||
key = "gd";
|
||||
lspBufAction = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
}
|
||||
{
|
||||
key = "gr";
|
||||
lspBufAction = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
}
|
||||
{
|
||||
key = "gD";
|
||||
lspBufAction = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
}
|
||||
{
|
||||
key = "gI";
|
||||
lspBufAction = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
}
|
||||
{
|
||||
key = "gT";
|
||||
lspBufAction = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
K = {
|
||||
action = "hover";
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
lspBufAction = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
}
|
||||
{
|
||||
key = "<leader>cw";
|
||||
lsbBufAction = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
}
|
||||
{
|
||||
key = "<leader>cr";
|
||||
lspBufAction = "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