From f89d5b0f6ed3fe54f31277af10d078cd140b2e79 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Wed, 1 May 2024 14:10:56 +0200 Subject: [PATCH] Neovim: Switch from rnix-lsp to nixd --- home/features/coding/nvim/default.nix | 54 +++++++++++++----------- home/features/coding/nvim/plugin/lsp.lua | 2 +- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/home/features/coding/nvim/default.nix b/home/features/coding/nvim/default.nix index 77c7b5c..44015a8 100644 --- a/home/features/coding/nvim/default.nix +++ b/home/features/coding/nvim/default.nix @@ -7,6 +7,34 @@ }: let vars = import ../../../../vars.nix; colors = config.colorScheme.colors; + stableExtraPkgs = with pkgs; [ + # LSP + lua-language-server + lua + + # Formatters + stylua # lua + black # pyton + alejandra # nix + clang-tools_16 # c/c++ + rustfmt + yamlfmt + + # Linters + ruff # python + nodePackages.jsonlint # json + nodePackages.eslint_d # javascript + + # Tools + xclip + wl-clipboard + fzf + gcc + ]; + unstableExtraPkgs = with pkgs.unstable; [ + # LSP + nixd + ]; in { home.sessionVariables.EDITOR = "nvim"; @@ -17,31 +45,7 @@ in { vimAlias = true; vimdiffAlias = true; - extraPackages = with pkgs; [ - # LSP - lua-language-server - lua - rnix-lsp # nix - - # Formatters - stylua # lua - black # pyton - alejandra # nix - clang-tools_16 # c/c++ - rustfmt - yamlfmt - - # Linters - ruff # python - nodePackages.jsonlint # json - nodePackages.eslint_d # javascript - - # Tools - xclip - wl-clipboard - fzf - gcc - ]; + extraPackages = stableExtraPkgs ++ unstableExtraPkgs; plugins = with pkgs.vimPlugins; [ { diff --git a/home/features/coding/nvim/plugin/lsp.lua b/home/features/coding/nvim/plugin/lsp.lua index 9fe3f1a..5d65d67 100644 --- a/home/features/coding/nvim/plugin/lsp.lua +++ b/home/features/coding/nvim/plugin/lsp.lua @@ -39,7 +39,7 @@ require("lspconfig").lua_ls.setup({ }, }) -require("lspconfig").rnix.setup({ +require("lspconfig").nixd.setup({ on_attach = on_attach, capabilities = capabilities, })