nixvim!
This commit is contained in:
parent
1ae2d7cc6a
commit
6198767e5b
47 changed files with 2430 additions and 108 deletions
98
modules/editors/nixvim/plug/lsp/lsp.nix
Normal file
98
modules/editors/nixvim/plug/lsp/lsp.nix
Normal file
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp-format = {enable = true;};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
eslint = {enable = true;};
|
||||
html = {enable = true;};
|
||||
lua-ls = {enable = true;};
|
||||
nil_ls = {enable = true;};
|
||||
marksman = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
gopls = {enable = true;};
|
||||
terraformls = {enable = true;};
|
||||
tsserver = {enable = false;};
|
||||
yamlls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
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