add nixd instead of nil-ls

This commit is contained in:
Sakooooo 2023-08-06 02:00:48 +03:00
parent 63a55d36b0
commit 701693bfc8
Signed by: sako
GPG key ID: 3FD715D87D7725E0
4 changed files with 22 additions and 1 deletions

View file

@ -30,7 +30,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities()
mason_null_ls.setup() mason_null_ls.setup()
-- funny lsp config stuff -- funny lsp config stuff
require('lspconfig').nil_ls.setup({ require('lspconfig').nixd.setup({
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
}) })

View file

@ -57,6 +57,7 @@
editors = { editors = {
nvim.enable = true; nvim.enable = true;
vscode.enable = true; vscode.enable = true;
nixd.enable = true;
}; };
cc.enable = true; cc.enable = true;
javascript.enable = true; javascript.enable = true;

View file

@ -6,5 +6,6 @@
./python.nix ./python.nix
./rust.nix ./rust.nix
./unityhub.nix ./unityhub.nix
./nixd.nix
]; ];
} }

19
modules/dev/nixd.nix Normal file
View file

@ -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
];
};
}