about summary refs log tree commit diff stats
path: root/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 17:07:46 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 17:07:46 +0200
commitc52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c (patch)
treee8b947710b467b32740598ff574982097836f66c /modules/home.legacy/conf/nvim/plgs/lsp/servers/servers
parentchore(pkgs/yt): 1.2.1 -> 1.3.0 (diff)
downloadnixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.tar.gz
nixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.zip
refactor(modules): Move all system modules to `by-name`
From now on all modules should be added to the new `by-name` directory.
This should help remove the (superficial and utterly useless)
distinction between `home-manager` and `NixOS` modules.
Diffstat (limited to 'modules/home.legacy/conf/nvim/plgs/lsp/servers/servers')
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/bashls.nix5
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ccls.nix5
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ltex.nix39
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/lua-ls.nix8
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix10
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/openscad.nix17
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/pylyzer.nix12
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/quick-lint-js.nix15
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ruff-lsp.nix10
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/rust-analyzer.nix17
-rw-r--r--modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/texlab.nix7
11 files changed, 145 insertions, 0 deletions
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/bashls.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/bashls.nix
new file mode 100644
index 00000000..0577a335
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/bashls.nix
@@ -0,0 +1,5 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    bashls.enable = true;
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ccls.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ccls.nix
new file mode 100644
index 00000000..0698bcce
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ccls.nix
@@ -0,0 +1,5 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    ccls.enable = true;
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ltex.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ltex.nix
new file mode 100644
index 00000000..3224bc41
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ltex.nix
@@ -0,0 +1,39 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    ltex = let
+      filetypes = [
+        "java"
+        "cpp"
+        "shell"
+        "bash"
+
+        "bibtex"
+        "context"
+        "context.tex"
+        "latex"
+        "tex"
+
+        "markdown"
+        "org"
+        "restructuredtext"
+        "rsweave"
+
+        "git-commit"
+        "gitcommit"
+
+        "mail"
+      ];
+    in {
+      enable = true;
+      inherit filetypes;
+      settings = {
+        enabled = filetypes;
+        completionEnabled = false;
+        language = "en-CA";
+        additionalRules = {
+          enablePickyRules = true;
+        };
+      };
+    };
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/lua-ls.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/lua-ls.nix
new file mode 100644
index 00000000..4f20558c
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/lua-ls.nix
@@ -0,0 +1,8 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    lua_ls = {
+      enable = true;
+      settings.telemetry.enable = false;
+    };
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix
new file mode 100644
index 00000000..f0cccbdc
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix
@@ -0,0 +1,10 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    nil_ls = {
+      enable = true;
+      settings = {
+        formatting.command = ["alejandra"];
+      };
+    };
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/openscad.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/openscad.nix
new file mode 100644
index 00000000..a0221cc4
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/openscad.nix
@@ -0,0 +1,17 @@
+{pkgs, ...}: {
+  programs.nixvim = {
+    extraConfigLuaPost =
+      /*
+      lua
+      */
+      ''
+        require('lspconfig').openscad_lsp.setup{
+          cmd = {"openscad-lsp", "--stdio", "--fmt-style", "WebKit"},
+        }
+      '';
+    extraPackages = with pkgs; [
+      openscad-lsp
+      clang-tools # Need to satisfy `clang-format` (which is used by openscad-lsp)
+    ];
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/pylyzer.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/pylyzer.nix
new file mode 100644
index 00000000..b1042221
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/pylyzer.nix
@@ -0,0 +1,12 @@
+{pkgs, ...}: {
+  programs.nixvim = {
+    extraConfigLuaPost =
+      /*
+      lua
+      */
+      ''
+        require('lspconfig').pylyzer.setup{}
+      '';
+    extraPackages = with pkgs; [pylyzer];
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/quick-lint-js.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/quick-lint-js.nix
new file mode 100644
index 00000000..23c3054a
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/quick-lint-js.nix
@@ -0,0 +1,15 @@
+{pkgs, ...}: {
+  programs.nixvim = {
+    extraConfigLuaPost =
+      /*
+      lua
+      */
+      ''
+        require('lspconfig').quick_lint_js.setup{
+        }
+      '';
+    extraPackages = with pkgs; [
+      quick-lint-js
+    ];
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ruff-lsp.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ruff-lsp.nix
new file mode 100644
index 00000000..6fbdc998
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/ruff-lsp.nix
@@ -0,0 +1,10 @@
+{pkgs, ...}: {
+  programs.nixvim = {
+    plugins.lsp.servers = {
+      ruff_lsp = {
+        enable = true;
+      };
+    };
+    extraPackages = with pkgs; [ruff];
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/rust-analyzer.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/rust-analyzer.nix
new file mode 100644
index 00000000..5da61a71
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/rust-analyzer.nix
@@ -0,0 +1,17 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    rust_analyzer = {
+      enable = true;
+      settings = {
+        typing.autoClosingAngleBrackets.enable = true;
+
+        # Check with `cargo clippy` instead of just `cargo check`
+        check.command = "clippy";
+      };
+      # NOTE: These should be provided by the devenv, to support nightly and
+      # such things <2023-11-25>
+      installCargo = false;
+      installRustc = false;
+    };
+  };
+}
diff --git a/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/texlab.nix b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/texlab.nix
new file mode 100644
index 00000000..59af8d39
--- /dev/null
+++ b/modules/home.legacy/conf/nvim/plgs/lsp/servers/servers/texlab.nix
@@ -0,0 +1,7 @@
+{...}: {
+  programs.nixvim.plugins.lsp.servers = {
+    texlab = {
+      enable = true;
+    };
+  };
+}