rename common module to nixos
This commit is contained in:
parent
68cc9cbc1d
commit
f22fddbd3e
60 changed files with 1 additions and 1 deletions
90
modules/default/nixos/nixvim/lsp.nix
Normal file
90
modules/default/nixos/nixvim/lsp.nix
Normal file
|
@ -0,0 +1,90 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
|
||||
hmts.enable = true;
|
||||
|
||||
lsp-lines = { enable = true; };
|
||||
lsp-format = { enable = true; };
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
clangd = { enable = true; };
|
||||
html = { enable = true; };
|
||||
lua_ls = { enable = true; };
|
||||
nixd = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
formatting.command = [ "nixpkgs-fmt" ];
|
||||
nixpkgs.expr = "import <nixpkgs> {}";
|
||||
};
|
||||
};
|
||||
pyright = { enable = true; };
|
||||
gopls = { enable = true; };
|
||||
jsonls = { enable = true; };
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue