testing nixvim 4

This commit is contained in:
cnst
2024-07-14 20:35:43 +02:00
parent 0de1b68dc9
commit d3bf04bf6c
3 changed files with 88 additions and 52 deletions

View File

@@ -15,6 +15,7 @@
./telescope.nix ./telescope.nix
./treesitter.nix ./treesitter.nix
./vimtex.nix ./vimtex.nix
./nonels.nix
]; ];
programs.nixvim = { programs.nixvim = {

View File

@@ -22,64 +22,52 @@
}; };
}; };
# Language server
lsp = {
enable = true;
servers = { servers = {
clangd = {enable = true;}; # Average webdev LSPs
tsserver.enable = true; # TS/JS
cssls.enable = true; # CSS
tailwindcss.enable = true; # TailwindCSS
html.enable = true; # HTML
astro.enable = true; # AstroJS
phpactor.enable = true; # PHP
svelte.enable = false; # Svelte
vuels.enable = false; # Vue
# Python
pyright.enable = true;
# Markdown
marksman.enable = true;
# Nix
nil-ls.enable = true;
# Docker
dockerls.enable = true;
# Bash
bashls.enable = true;
# C/C++
clangd.enable = true;
# C#
csharp-ls.enable = true;
# Lua
lua-ls = { lua-ls = {
enable = true; enable = true;
extraOptions = { settings.telemetry.enable = false;
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
rust-analyzer = { rust-analyzer = {
enable = true; enable = true;
installCargo = true;
installRustc = true; installRustc = true;
installCargo = true;
settings = { settings = {
checkOnSave = true; checkOnSave = true;
check = { check = {
@@ -91,4 +79,5 @@
}; };
}; };
}; };
};
} }

View File

@@ -0,0 +1,46 @@
{
programs.nixvim.plugins.none-ls = {
enable = true;
settings = {
cmd = ["bash -c nvim"];
debug = true;
};
sources = {
code_actions = {
statix.enable = true;
gitsigns.enable = true;
};
diagnostics = {
statix.enable = true;
deadnix.enable = true;
pylint.enable = true;
checkstyle.enable = true;
};
formatting = {
alejandra.enable = true;
stylua.enable = true;
shfmt.enable = true;
nixpkgs_fmt.enable = true;
google_java_format.enable = false;
prettier = {
enable = true;
disableTsServerFormatter = true;
};
black = {
enable = true;
withArgs = ''
{
extra_args = { "--fast" },
}
'';
};
};
completion = {
luasnip.enable = true;
spell.enable = true;
};
};
};
}