mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
nixvimConfigs/trovebelt/setups/lsp: init
This commit is contained in:
parent
abb50f11d4
commit
e4ddf9aeff
@ -1,7 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./modules ];
|
||||
|
||||
config = {
|
||||
nixvimConfigs.trovebelt.setups = {
|
||||
lsp.enable = true;
|
||||
};
|
||||
|
||||
# Some general settings.
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
|
5
configs/nixvim/trovebelt/modules/default.nix
Normal file
5
configs/nixvim/trovebelt/modules/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./setups/lsp.nix
|
||||
];
|
||||
}
|
71
configs/nixvim/trovebelt/modules/setups/lsp.nix
Normal file
71
configs/nixvim/trovebelt/modules/setups/lsp.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
nixvimCfg = config.nixvimConfigs.trovebelt;
|
||||
cfg = nixvimCfg.setups.lsp;
|
||||
in
|
||||
{
|
||||
options.nixvimConfigs.trovebelt.setups.lsp.enable =
|
||||
lib.mkEnableOption "LSP setup alongside the preferred servers installation";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins.lsp.enable = true;
|
||||
|
||||
# Make all of the preferred language servers.
|
||||
plugins.lsp.servers =
|
||||
let
|
||||
servers = [
|
||||
"ansiblels" # For Ansible.
|
||||
"astro" # For Astro.
|
||||
"beancount" # For Beancount.
|
||||
"bashls" # For Bash.
|
||||
"clangd" # For C/C++.
|
||||
"clojure-lsp" # For Clojure.
|
||||
"cmake" # For CMake.
|
||||
"cssls" # For CSS.
|
||||
"dagger" # For Dagger.
|
||||
"dartls" # For Dart.
|
||||
"denols" # For Deno.
|
||||
"dhall-lsp-server" # For Dhall.
|
||||
"dockerls" # For Dockerfiles.
|
||||
"efm" # For whatever.
|
||||
"elixirls" # For Elixir.
|
||||
"elmls" # For Elm.
|
||||
"emmet_ls" # For Emmet support.
|
||||
"eslint" # For JavaScript.
|
||||
"gdscript" # For Godot.
|
||||
"gopls" # For Go.
|
||||
"graphql" # For GraphQL.
|
||||
"hls" # For Haskell.
|
||||
"html" # For HTML.
|
||||
"htmx" # For HTMX.
|
||||
"java-language-server" # For Java.
|
||||
"jsonls" # For JSON.
|
||||
"julials" # For Julia.
|
||||
"kotlin-language-server" # For Kotlin.
|
||||
"lemminx" # For XML.
|
||||
"lua-ls" # For Lua.
|
||||
"nil_ls" # For Nix.
|
||||
"nushell" # For Nushell.
|
||||
"perlpls" # For Perl.
|
||||
"phpactor" # For PHP.
|
||||
"pyright" # For Python.
|
||||
"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.
|
||||
"vls" # For V.
|
||||
"volar" # For Vue.
|
||||
"yamlls" # For YAML.
|
||||
"zls" # For Zig.
|
||||
];
|
||||
|
||||
mkEnableServerConfig = server: lib.nameValuePair server { enable = true; };
|
||||
in
|
||||
lib.listToAttrs (builtins.map mkEnableServerConfig servers);
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user