helix: refactor, set a bunch of config options

Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696435b4ad15f4b5a6570bb6fd3c34a29d92
This commit is contained in:
fau 2025-07-27 17:35:58 +02:00
commit 6ae25f23cf
No known key found for this signature in database

View file

@ -6,9 +6,10 @@
}:
let
inherit (lib.attrsets) mapAttrs' nameValuePair;
inherit (lib.meta) getExe;
helix = pkgs.helix.overrideAttrs (
finalAttrs: previousAttrs: {
finalAttrs: _: {
version = "25.07.2";
src = pkgs.fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz";
@ -25,28 +26,6 @@ let
}
);
helix-with-plugins = pkgs.helix.overrideAttrs (
finalAttrs: previousAttrs: {
name = "helix-with-plugins";
version = "25.07.2";
src = pkgs.fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz";
hash = "sha256-ZNsQwFfPXe6oewajx1tl68W60kVo7q2SuvTgy/o1HKk=";
stripRoot = false;
};
doInstallCheck = false;
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (helix) src;
hash = "sha256-3poZSvIrkx8lguxxDeNfngW6+4hH8TV/LHcZx5W5aXg=";
};
postInstall = ''
mv $out/bin/hx $out/bin/hxp
'';
}
);
toml = pkgs.formats.toml { };
languages =
@ -70,7 +49,7 @@ let
};
new-deadnix = pkgs.deadnix.overrideAttrs (
finalAttrs: previousAttrs: {
_: _: {
version = "unstable-15-07-2025";
src = pkgs.fetchFromGitHub {
owner = "astro";
@ -158,7 +137,10 @@ let
}
{
name = "nix";
language-servers = [ "nil" ];
language-servers = [
"nil"
"deadnix"
];
}
{
name = "qml";
@ -280,11 +262,11 @@ let
config.nil = {
formatting.command = [ "${getExe nixfmt}" ];
diagnostics = {
bindingEndHintMinLines = 3;
bindingEndHintMinLines = 10;
};
nix.flake = {
autoArchive = true;
# autoEvalInputs = true;
autoEvalInputs = true;
nixpkgsInputName = "nixpkgs";
};
};
@ -311,10 +293,8 @@ let
args = [ "server" ];
};
qmlls = {
command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
args = [ "-E" ];
};
qmlls.command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
basedpyright.command = "${pkgs.basedpyright}/bin/basedpyright-langserver";
vscode-css-language-server = {
@ -372,18 +352,28 @@ let
lsp = {
enable = true;
auto-signature-help = true;
display-inlay-hints = false;
display-inlay-hints = true;
display-messages = true;
display-progress-messages = true;
snippets = true;
};
file-picker = {
hidden = true;
hidden = false;
};
line-number = "relative";
auto-format = true;
completion-timeout = 5;
clipboard-provider = "wayland";
# Shell to use when running external commands.
shell = [
(getExe pkgs.nushell)
"-c"
];
completion-trigger-len = 1;
completion-replace = true;
mouse = true;
bufferline = "multiple";
popup-border = "none";
soft-wrap.enable = true;
word-completion = {
enable = true;
@ -397,22 +387,26 @@ let
statusline = {
left = [
"spinner"
"version-control"
"diagnostics"
"file-name"
];
right = [
"file-base-name"
"file-type"
"position"
"file-encoding"
];
diagnostics = [
"warning"
"error"
];
workspace-diagnostics = [
"warning"
"error"
];
};
gutters.layout = [
"diff"
"diagnostics"
"line-numbers"
"spacer"
];
inline-diagnostics = {
cursor-line = "hint";