2023-06-29 07:45:34 +07:00
|
|
|
{ pkgs, lib, ... }:
|
2023-01-24 02:24:40 +07:00
|
|
|
let
|
2023-06-29 08:17:19 +07:00
|
|
|
wrapHelix = { extraPackages ? [ ], withPython3 ? true, extraPython3Packages ? (_: [ ]) }:
|
2023-01-24 02:24:40 +07:00
|
|
|
pkgs.symlinkJoin {
|
|
|
|
postBuild = ''
|
|
|
|
rm $out/bin/hx
|
2023-06-29 07:45:34 +07:00
|
|
|
makeWrapper ${lib.escapeShellArgs
|
|
|
|
[ "${pkgs.helix}/bin/hx" "${placeholder "out"}/bin/hx"
|
|
|
|
"--suffix" "PATH" ":" (lib.makeBinPath (extraPackages ++ [ (pkgs.python3.withPackages extraPython3Packages) ])) ]}
|
2023-01-24 02:24:40 +07:00
|
|
|
'';
|
|
|
|
buildInputs = [ pkgs.makeWrapper ]; preferLocalBuild = true;
|
|
|
|
name = "helix${pkgs.helix.version}"; paths = [ pkgs.helix ];
|
2023-06-29 07:45:34 +07:00
|
|
|
passthru.unwrapped = pkgs.helix; inherit (pkgs.helix) meta version;
|
2023-01-24 02:24:40 +07:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
programs.helix = {
|
|
|
|
enable = true;
|
|
|
|
package = wrapHelix {
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
rust-analyzer
|
|
|
|
nodePackages.bash-language-server shellcheck
|
|
|
|
nodePackages.typescript-language-server
|
2023-03-16 23:37:57 +07:00
|
|
|
clang-tools_latest
|
2023-01-24 02:24:40 +07:00
|
|
|
nodePackages.vscode-langservers-extracted
|
|
|
|
nil
|
|
|
|
marksman
|
|
|
|
taplo
|
|
|
|
];
|
|
|
|
extraPython3Packages = (pypkgs: with pypkgs; [ python-lsp-server ]);
|
|
|
|
};
|
2023-06-29 08:17:19 +07:00
|
|
|
# languages = [ ];
|
2023-01-24 02:24:40 +07:00
|
|
|
settings = {
|
|
|
|
theme = "base16_terminal";
|
2023-06-29 08:17:19 +07:00
|
|
|
editor.cursor-shape = {
|
|
|
|
insert = "bar";
|
|
|
|
normal = "block";
|
|
|
|
select = "block";
|
|
|
|
};
|
2023-01-24 02:24:40 +07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|