diff --git a/config/nvim/lua/core/plugin_config/lsp_config.lua b/config/nvim/lua/core/plugin_config/lsp_config.lua index 7ce57453..49a1ed6c 100644 --- a/config/nvim/lua/core/plugin_config/lsp_config.lua +++ b/config/nvim/lua/core/plugin_config/lsp_config.lua @@ -30,9 +30,17 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() mason_null_ls.setup() -- funny lsp config stuff -require('lspconfig').nixd.setup({ +require('lspconfig').nil_ls.setup({ on_attach = on_attach, capabilities = capabilities, + settings = { + ['nil'] = { + testSetting = 42, + formatting = { + command = { "nixpkgs-fmt" }, + }, + }, + }, }) diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index ca13e40b..5f74dbbe 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -58,7 +58,8 @@ nvim.enable = true; vscode.enable = true; }; - nixd.enable = true; + nixd.enable = false; + nil.enable = true; cc.enable = true; javascript.enable = true; python.enable = true; diff --git a/modules/dev/nil.nix b/modules/dev/nil.nix new file mode 100644 index 00000000..a4152cbb --- /dev/null +++ b/modules/dev/nil.nix @@ -0,0 +1,16 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.nil; +in +{ + options.modules.dev.nil = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + nil + ]; + }; +}