fennel-ls maybe

This commit is contained in:
Anish Lakhwara 2022-12-30 22:36:20 +10:00
parent 63bd48abf6
commit 708e0fec3a
3 changed files with 34 additions and 2 deletions

View file

@ -629,7 +629,7 @@ in
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig')
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua' }
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua', 'fennel-ls' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = function(client, bufnr)
@ -864,6 +864,7 @@ in
nodePackages.typescript
nodePackages.typescript-language-server
sumneko-lua-language-server
fennel-ls
];
plugins = with pkgs.vimPlugins // customPlugins; [

View file

@ -4,5 +4,5 @@
{ pkgs ? (import ../nixpkgs.nix) { } }: {
plymouth-themes = pkgs.callPackage ./plymouth.nix { };
tic-80 = pkgs.callPackage ./tic-80.nix { };
fennel-ls = pkgs.callPackage ./fennel-ls.nix { };
}

31
pkgs/fennel-ls.nix Normal file
View file

@ -0,0 +1,31 @@
# Stolen from: https://gist.github.com/jjwatt/c83c02e6903c8ffaf546fe5eb27e7d25?permalink_comment_id=3305141#gistcomment-3305141
{ pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
name = "fennel-ls";
src = pkgs.fetchgit {
url = "https://git.sr.ht/~xerool/fennel-ls";
rev = "70e434839fdf9fad7512118d3f72e38aa8d3ca9f";
sha256 = "mYOAlSCixlWzykPeLcGyTzWksDAJjblkYwI0k1GuYvE=";
};
buildInputs = with pkgs; [
lua
fennel
];
configurePhase = ''
echo [DIRECTORY] $(pwd)
sed -i 's/\.\/fennel/fennel/' Makefile
# cd build/
# cmake ..
'';
buildPhase = ''
make -j4
'';
installPhase = ''
mkdir -p $out/bin
chmod a+x fennel-ls
cp -v fennel-ls $out/bin
'';
}