diff --git a/flake.lock b/flake.lock index 65e6f65..bf46b4a 100644 --- a/flake.lock +++ b/flake.lock @@ -17,6 +17,45 @@ "type": "indirect" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1709336216, + "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixd-nightly": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1710553072, + "narHash": "sha256-g80GlUrlCdHQVaJq9r8myCIzLmQp59e6jiGfxkodNYo=", + "owner": "nix-community", + "repo": "nixd", + "rev": "a436786fbd8ed5aafea4b0512cb1170a6e0e39df", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixd", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1709961763, @@ -67,9 +106,28 @@ "type": "github" } }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1709237383, + "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", + "nixd-nightly": "nixd-nightly", "nixpkgs": "nixpkgs", "nixpkgs-2305": "nixpkgs-2305" } diff --git a/flake.nix b/flake.nix index 107071d..8e8dcdf 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,9 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-2305.url = "github:NixOS/nixpkgs/nixos-23.05"; + + nixd-nightly.inputs.nixpkgs.follows = "nixpkgs"; + nixd-nightly.url = "github:nix-community/nixd"; }; outputs = inputs @ { diff --git a/lib/default.nix b/lib/default.nix index 70c0a5f..5f4c909 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -257,6 +257,7 @@ in rec { ]; mkExtraPackages = {system}: let + inherit (inputs) nixd-nightly; inherit (pkgs) nodePackages lua54Packages php82Packages; pkgs = import inputs.nixpkgs { @@ -271,6 +272,7 @@ in rec { # Language servers lua54Packages.luacheck + nixd-nightly.packages.${system}.nixd nodePackages."@tailwindcss/language-server" nodePackages.bash-language-server nodePackages.dockerfile-language-server-nodejs @@ -283,9 +285,7 @@ in rec { nodePackages.yaml-language-server pkgs.gopls pkgs.lua-language-server - # pkgs.nixd pkgs.phpactor - # pkgs.rnix-lsp pkgs.terraform-ls # Formatters diff --git a/lua/opdavies/lsp/init.lua b/lua/opdavies/lsp/init.lua index cfe028e..28345d9 100644 --- a/lua/opdavies/lsp/init.lua +++ b/lua/opdavies/lsp/init.lua @@ -96,7 +96,7 @@ local servers = { }, }, }, - rnix = {}, + nixd = {}, tailwindcss = { filetypes = { "html", "html.twig", "javascript", "typescript", "vue" },