diff --git a/config/nvim/lua/core/plugin_config/lsp_config.lua b/config/nvim/lua/core/plugin_config/lsp_config.lua index 04c17406..7ce57453 100644 --- a/config/nvim/lua/core/plugin_config/lsp_config.lua +++ b/config/nvim/lua/core/plugin_config/lsp_config.lua @@ -30,7 +30,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() mason_null_ls.setup() -- funny lsp config stuff -require('lspconfig').nil_ls.setup({ +require('lspconfig').nixd.setup({ on_attach = on_attach, capabilities = capabilities, }) diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 1ac96a30..5f399149 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -57,6 +57,7 @@ editors = { nvim.enable = true; vscode.enable = true; + nixd.enable = true; }; cc.enable = true; javascript.enable = true; diff --git a/modules/dev/default.nix b/modules/dev/default.nix index e4ea4546..b400938c 100644 --- a/modules/dev/default.nix +++ b/modules/dev/default.nix @@ -6,5 +6,6 @@ ./python.nix ./rust.nix ./unityhub.nix + ./nixd.nix ]; } diff --git a/modules/dev/nixd.nix b/modules/dev/nixd.nix new file mode 100644 index 00000000..88dcdf24 --- /dev/null +++ b/modules/dev/nixd.nix @@ -0,0 +1,19 @@ +# nixd nix lsp using nix and nixpkgs +# where has this been my whole life +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.nixd; +in +{ + options.modules.dev.nixd = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + nixd + nixpkgs-fmt + ]; + }; +}