nixvimConfigs/trovebelt: update LSP config and enable installation of its servers

Just to make the all-encompassing Neovim config more usable.
This commit is contained in:
Gabriel Arazas 2025-03-07 09:43:20 +08:00
parent 75ca42754d
commit f6dc11606b
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
3 changed files with 87 additions and 70 deletions

View File

@ -32,7 +32,7 @@ in {
};
# Enable all of the debugging extensoins.
plugins.dap.extensions.dap-go.enable = true;
plugins.dap.extensions.dap-python.enable = true;
plugins.dap-go.enable = true;
plugins.dap-python.enable = true;
};
}

View File

@ -7,7 +7,8 @@ in {
options.nixvimConfigs.trovebelt.setups.lsp.enable =
lib.mkEnableOption "LSP setup alongside the preferred servers installation";
config = lib.mkIf cfg.enable {
config = lib.mkIf cfg.enable (lib.mkMerge [
{
plugins.lsp.enable = true;
# Make all of the preferred language servers.
@ -18,18 +19,18 @@ in {
"beancount" # For Beancount.
"bashls" # For Bash.
"clangd" # For C/C++.
"clojure-lsp" # For Clojure.
"clojure_lsp" # For Clojure.
"cmake" # For CMake.
"cssls" # For CSS.
"dagger" # For Dagger.
"dartls" # For Dart.
"denols" # For Deno.
"dhall-lsp-server" # For Dhall.
"dhall_lsp_server" # For Dhall.
"dockerls" # For Dockerfiles.
"efm" # For whatever.
"elixirls" # For Elixir.
"elmls" # For Elm.
"emmet-ls" # For Emmet support.
"emmet_ls" # For Emmet support.
"eslint" # For JavaScript.
"gdscript" # For Godot.
"gopls" # For Go.
@ -37,25 +38,25 @@ in {
"hls" # For Haskell.
"html" # For HTML.
"htmx" # For HTMX.
"java-language-server" # For Java.
"java_language_server" # For Java.
"jsonls" # For JSON.
"julials" # For Julia.
"kotlin-language-server" # For Kotlin.
"kotlin_language_server" # For Kotlin.
"lemminx" # For XML.
"lua-ls" # For Lua.
"nil-ls" # For Nix.
"lua_ls" # For Lua.
"nil_ls" # For Nix.
"nushell" # For Nushell.
"perlpls" # For Perl.
"phpactor" # For PHP.
"pyright" # For Python.
"rust-analyzer" # For Rust.
"rust_analyzer" # For Rust.
"solargraph" # For Ruby.
"svelte" # For Svelte.
"taplo" # For TOML.
"tailwindcss" # For Tailwind CSS.
"terraformls" # For Terraform.
"tsserver" # For TypeScript.
"typst-lsp" # For Typst.
"ts_ls" # For TypeScript.
"typst_lsp" # For Typst.
"vls" # For V.
"volar" # For Vue.
"yamlls" # For YAML.
@ -65,5 +66,17 @@ in {
mkEnableServerConfig = server:
lib.nameValuePair server { enable = true; };
in lib.listToAttrs (builtins.map mkEnableServerConfig servers);
}
{
plugins.lsp.servers.rust_analyzer = {
installCargo = lib.mkDefault true;
installRustc = lib.mkDefault true;
};
plugins.lsp.servers.hls = {
installGhc = lib.mkDefault true;
};
}
]);
}

View File

@ -41,12 +41,15 @@ in {
# Enable them status bars.
plugins.lualine = {
enable = true;
iconsEnabled = true;
settings = {
options = {
icons_enabled = true;
globalstatus = true;
alwaysDivideMiddle = true;
always_divide_middle = true;
};
# Disable the section separators.
sectionSeparators = {
section_separators = {
left = "";
right = "";
};
@ -57,4 +60,5 @@ in {
};
};
};
};
}