initial commit
This commit is contained in:
commit
35fb1473db
20 changed files with 836 additions and 0 deletions
6
config/lsp/default.nix
Normal file
6
config/lsp/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./lsp-format.nix
|
||||
];
|
||||
}
|
5
config/lsp/lsp-format.nix
Normal file
5
config/lsp/lsp-format.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
plugins.lsp-format = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
75
config/lsp/lsp.nix
Normal file
75
config/lsp/lsp.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
cmake = {
|
||||
enable = true;
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
};
|
||||
metals = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gA = {
|
||||
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";
|
||||
};
|
||||
"<f2>" = {
|
||||
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