mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/nvim-lsp: internal rename (nvim-lsp -> lsp)
This commit is contained in:
parent
079b0c30cd
commit
859ae3a843
17 changed files with 8 additions and 8 deletions
17
tests/test-sources/plugins/lsp/inc-rename.nix
Normal file
17
tests/test-sources/plugins/lsp/inc-rename.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.inc-rename.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.inc-rename = {
|
||||
enable = true;
|
||||
cmdName = "IncRename";
|
||||
hlGroup = "Substitute";
|
||||
previewEmptyName = false;
|
||||
showMessage = true;
|
||||
inputBufferType = null;
|
||||
postHook = null;
|
||||
};
|
||||
};
|
||||
}
|
5
tests/test-sources/plugins/lsp/lsp-lines.nix
Normal file
5
tests/test-sources/plugins/lsp/lsp-lines.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.lsp-lines.enable = true;
|
||||
};
|
||||
}
|
88
tests/test-sources/plugins/lsp/nvim-lsp.nix
Normal file
88
tests/test-sources/plugins/lsp/nvim-lsp.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.lsp.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>j" = "goto_next";
|
||||
};
|
||||
|
||||
lspBuf = {
|
||||
"gd" = "definition";
|
||||
"gD" = "references";
|
||||
"gt" = "type_definition";
|
||||
"gi" = "implementation";
|
||||
"K" = "hover";
|
||||
};
|
||||
};
|
||||
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
clangd = {
|
||||
enable = true;
|
||||
onAttach.function = ''
|
||||
print('The clangd language server has been attached !')
|
||||
'';
|
||||
};
|
||||
nil_ls.enable = true;
|
||||
rust-analyzer.enable = true;
|
||||
ruff-lsp = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
init_options.settings.args = ["--config=/path/to/config.toml"];
|
||||
};
|
||||
};
|
||||
pylsp = {
|
||||
enable = true;
|
||||
filetypes = ["python"];
|
||||
autostart = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
all-servers = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
servers = {
|
||||
astro.enable = true;
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
cssls.enable = true;
|
||||
dartls.enable = true;
|
||||
denols.enable = true;
|
||||
eslint.enable = true;
|
||||
elixirls.enable = true;
|
||||
gopls.enable = true;
|
||||
hls.enable = true;
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
metals.enable = true;
|
||||
nil_ls.enable = true;
|
||||
pylsp.enable = true;
|
||||
pyright.enable = true;
|
||||
rnix-lsp.enable = true;
|
||||
ruff-lsp.enable = true;
|
||||
rust-analyzer.enable = true;
|
||||
sourcekit.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
terraformls.enable = true;
|
||||
texlab.enable = true;
|
||||
tsserver.enable = true;
|
||||
typst-lsp.enable = true;
|
||||
vuels.enable = true;
|
||||
yamlls.enable = true;
|
||||
# zls.enable = true; Broken as of 03/17/2023
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
65
tests/test-sources/plugins/lsp/trouble.nix
Normal file
65
tests/test-sources/plugins/lsp/trouble.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.trouble.enable = true;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers.clangd.enable = true;
|
||||
};
|
||||
|
||||
plugins.trouble.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of trouble
|
||||
defaults = {
|
||||
plugins.trouble = {
|
||||
enable = true;
|
||||
|
||||
position = "bottom";
|
||||
height = 10;
|
||||
width = 50;
|
||||
icons = true;
|
||||
mode = "workspace_diagnostics";
|
||||
foldOpen = "";
|
||||
foldClosed = "";
|
||||
group = true;
|
||||
padding = true;
|
||||
actionKeys = {
|
||||
close = "q";
|
||||
cancel = "<esc>";
|
||||
refresh = "r";
|
||||
jump = ["<cr>" "<tab>"];
|
||||
openSplit = ["<c-x>"];
|
||||
openVsplit = ["<c-v>"];
|
||||
openTab = ["<c-t>"];
|
||||
jumpClose = ["o"];
|
||||
toggleMode = "m";
|
||||
togglePreview = "P";
|
||||
hover = "K";
|
||||
preview = "p";
|
||||
closeFolds = ["zM" "zm"];
|
||||
openFolds = ["zR" "zr"];
|
||||
toggleFold = ["zA" "za"];
|
||||
previous = "k";
|
||||
next = "j";
|
||||
};
|
||||
indentLines = true;
|
||||
autoOpen = false;
|
||||
autoClose = false;
|
||||
autoPreview = true;
|
||||
autoFold = false;
|
||||
autoJump = ["lsp_definitions"];
|
||||
signs = {
|
||||
error = "";
|
||||
warning = "";
|
||||
hint = "";
|
||||
information = "";
|
||||
other = "";
|
||||
};
|
||||
useDiagnosticSigns = false;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue