95 lines
2.7 KiB
Nix
95 lines
2.7 KiB
Nix
{
|
|
programs.nixvim = {
|
|
plugins = {
|
|
lsp = {
|
|
enable = true;
|
|
|
|
keymaps = {
|
|
silent = true;
|
|
diagnostic = {
|
|
# Navigate in diagnostics
|
|
"<leader>k" = "goto_prev";
|
|
"<leader>j" = "goto_next";
|
|
};
|
|
|
|
lspBuf = {
|
|
gd = "definition";
|
|
gD = "references";
|
|
gt = "type_definition";
|
|
gi = "implementation";
|
|
K = "hover";
|
|
"<F2>" = "rename";
|
|
};
|
|
};
|
|
|
|
servers = {
|
|
clangd = {enable = true;};
|
|
lua-ls = {
|
|
enable = true;
|
|
extraOptions = {
|
|
settings = {
|
|
Lua = {
|
|
completion = {
|
|
callSnippet = "Replace";
|
|
};
|
|
telemetry = {
|
|
enabled = false;
|
|
};
|
|
hint = {enable = true;};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
nil-ls = {enable = true;};
|
|
tsserver = {
|
|
enable = true;
|
|
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"];
|
|
cmd = ["./tsserver-wrapper.sh"];
|
|
extraOptions = {
|
|
settings = {
|
|
javascript = {
|
|
inlayHints = {
|
|
includeInlayEnumMemberValueHints = true;
|
|
includeInlayFunctionLikeReturnTypeHints = true;
|
|
includeInlayFunctionParameterTypeHints = true;
|
|
includeInlayParameterNameHints = "all";
|
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
|
includeInlayPropertyDeclarationTypeHints = true;
|
|
includeInlayVariableTypeHints = true;
|
|
};
|
|
};
|
|
typescript = {
|
|
inlayHints = {
|
|
includeInlayEnumMemberValueHints = true;
|
|
includeInlayFunctionLikeReturnTypeHints = true;
|
|
includeInlayFunctionParameterTypeHints = true;
|
|
includeInlayParameterNameHints = "all";
|
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
|
includeInlayPropertyDeclarationTypeHints = true;
|
|
includeInlayVariableTypeHints = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
eslint = {enable = true;};
|
|
pyright = {enable = true;};
|
|
ruff-lsp = {enable = true;};
|
|
|
|
rust-analyzer = {
|
|
enable = true;
|
|
installCargo = true;
|
|
installRustc = true;
|
|
settings = {
|
|
checkOnSave = true;
|
|
check = {
|
|
command = "clippy";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|