From a6f80c730bfee848070efd728034bdc7f0fd2236 Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 24 Jul 2023 15:32:05 +0200 Subject: [PATCH] feat(nvim): set up fennel_ls --- flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ overlay/default.nix | 1 + overlay/fennel-ls/default.nix | 25 +++++++++++++++++++++++++ programs/nvim.nix | 2 ++ 5 files changed, 50 insertions(+) create mode 100644 overlay/fennel-ls/default.nix diff --git a/flake.lock b/flake.lock index a26476f..c733ba2 100644 --- a/flake.lock +++ b/flake.lock @@ -124,6 +124,22 @@ "type": "github" } }, + "fennel-ls": { + "flake": false, + "locked": { + "lastModified": 1689863239, + "narHash": "sha256-xPTgGmeILJSNsC++r9x+ussS7ttG7a5Cgl/D02auTgE=", + "owner": "~xerool", + "repo": "fennel-ls", + "rev": "e7c642e12a15c6d452559414ee1890b30f4e8406", + "type": "sourcehut" + }, + "original": { + "owner": "~xerool", + "repo": "fennel-ls", + "type": "sourcehut" + } + }, "gh-nvim": { "flake": false, "locked": { @@ -283,6 +299,7 @@ "cmp-git": "cmp-git", "copilot-cmp": "copilot-cmp", "copilot-lua": "copilot-lua", + "fennel-ls": "fennel-ls", "gh-nvim": "gh-nvim", "home-manager": "home-manager_2", "impermanence": "impermanence", diff --git a/flake.nix b/flake.nix index 7ee362b..5961b70 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,11 @@ flake = false; }; + fennel-ls = { + url = "sourcehut:~xerool/fennel-ls"; + flake = false; + }; + gh-nvim = { url = "github:ldelossa/gh.nvim"; flake = false; diff --git a/overlay/default.nix b/overlay/default.nix index 037142d..d4db3db 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -2,4 +2,5 @@ inputs: self: super: { inherit inputs; apl386 = super.callPackage ./apl386 {}; + fennel-ls = super.callPackage ./fennel-ls {}; } diff --git a/overlay/fennel-ls/default.nix b/overlay/fennel-ls/default.nix new file mode 100644 index 0000000..bc8f560 --- /dev/null +++ b/overlay/fennel-ls/default.nix @@ -0,0 +1,25 @@ +{ + inputs, + lib, + stdenvNoCC, + lua, + luaPackages, +}: +stdenvNoCC.mkDerivation { + name = "fennel-ls"; + + src = inputs.fennel-ls; + + nativeBuildInputs = [luaPackages.fennel]; + buildInputs = [lua]; + + makeFlags = ["PREFIX=$(out)"]; + + meta = with lib; { + description = "A language server for fennel-ls."; + homepage = "https://git.sr.ht/~xerool/fennel-ls"; + license = licenses.mit; + platforms = lua.meta.platforms; + maintainers = with maintainers; [buffet]; + }; +} diff --git a/programs/nvim.nix b/programs/nvim.nix index f2a4557..8af4d15 100644 --- a/programs/nvim.nix +++ b/programs/nvim.nix @@ -10,6 +10,7 @@ home.packages = with pkgs; [ clang-tools + fennel-ls nil rust-analyzer sumneko-lua-language-server @@ -376,6 +377,7 @@ ''; servers = [ "clangd" + "fennel_ls" "gopls" "lua_ls" "nil_ls"