wrap helix with lsp and formatter, and add some config for helix

This commit is contained in:
ulic-youthlic 2025-01-17 14:35:18 +08:00
parent ca525c5789
commit 9c60b5872c
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
6 changed files with 176 additions and 28 deletions

View file

@ -5,6 +5,7 @@
}:
{
pinentry-selector = pkgs.callPackage ./pinentry-selector.nix { };
helix = pkgs.callPackage ./helix.nix { inherit inputs; };
}
// (
let

42
pkgs/helix.nix Normal file
View file

@ -0,0 +1,42 @@
{
lib,
pkgs,
inputs,
...
}:
pkgs.runCommand "helix-wrapped"
{
buildInputs = [ pkgs.makeWrapper ];
}
''
mkdir -p $out/bin
makeWrapper "${lib.getExe inputs.helix.packages."${pkgs.system}".default}" $out/bin/hx \
--prefix PATH : ${
lib.makeBinPath (
with pkgs;
[
clang-tools
libxml2
typstyle
pyright
ruff
gotools
yaml-language-server
taplo
markdown-oxide
nixd
deno
nixfmt-rfc-style
vscode-langservers-extracted
fish-lsp
gopls
golangci-lint-langserver
tinymist
delve
lldb
rust-analyzer
nil
]
)
}
''