helix: refactor, set a bunch of config options
Signed-off-by: fau <fau@faukah.com> Change-Id: I6a6a696435b4ad15f4b5a6570bb6fd3c34a29d92
This commit is contained in:
parent
e69e385f93
commit
6ae25f23cf
1 changed files with 32 additions and 38 deletions
|
@ -6,9 +6,10 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib.attrsets) mapAttrs' nameValuePair;
|
inherit (lib.attrsets) mapAttrs' nameValuePair;
|
||||||
|
inherit (lib.meta) getExe;
|
||||||
|
|
||||||
helix = pkgs.helix.overrideAttrs (
|
helix = pkgs.helix.overrideAttrs (
|
||||||
finalAttrs: previousAttrs: {
|
finalAttrs: _: {
|
||||||
version = "25.07.2";
|
version = "25.07.2";
|
||||||
src = pkgs.fetchzip {
|
src = pkgs.fetchzip {
|
||||||
url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz";
|
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 { };
|
toml = pkgs.formats.toml { };
|
||||||
|
|
||||||
languages =
|
languages =
|
||||||
|
@ -70,7 +49,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
new-deadnix = pkgs.deadnix.overrideAttrs (
|
new-deadnix = pkgs.deadnix.overrideAttrs (
|
||||||
finalAttrs: previousAttrs: {
|
_: _: {
|
||||||
version = "unstable-15-07-2025";
|
version = "unstable-15-07-2025";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "astro";
|
owner = "astro";
|
||||||
|
@ -158,7 +137,10 @@ let
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "nix";
|
name = "nix";
|
||||||
language-servers = [ "nil" ];
|
language-servers = [
|
||||||
|
"nil"
|
||||||
|
"deadnix"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "qml";
|
name = "qml";
|
||||||
|
@ -280,11 +262,11 @@ let
|
||||||
config.nil = {
|
config.nil = {
|
||||||
formatting.command = [ "${getExe nixfmt}" ];
|
formatting.command = [ "${getExe nixfmt}" ];
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
bindingEndHintMinLines = 3;
|
bindingEndHintMinLines = 10;
|
||||||
};
|
};
|
||||||
nix.flake = {
|
nix.flake = {
|
||||||
autoArchive = true;
|
autoArchive = true;
|
||||||
# autoEvalInputs = true;
|
autoEvalInputs = true;
|
||||||
nixpkgsInputName = "nixpkgs";
|
nixpkgsInputName = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -311,10 +293,8 @@ let
|
||||||
args = [ "server" ];
|
args = [ "server" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
qmlls = {
|
qmlls.command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
|
||||||
command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
|
|
||||||
args = [ "-E" ];
|
|
||||||
};
|
|
||||||
basedpyright.command = "${pkgs.basedpyright}/bin/basedpyright-langserver";
|
basedpyright.command = "${pkgs.basedpyright}/bin/basedpyright-langserver";
|
||||||
|
|
||||||
vscode-css-language-server = {
|
vscode-css-language-server = {
|
||||||
|
@ -372,18 +352,28 @@ let
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
auto-signature-help = true;
|
auto-signature-help = true;
|
||||||
display-inlay-hints = false;
|
display-inlay-hints = true;
|
||||||
display-messages = true;
|
display-messages = true;
|
||||||
|
display-progress-messages = true;
|
||||||
snippets = true;
|
snippets = true;
|
||||||
};
|
};
|
||||||
file-picker = {
|
file-picker = {
|
||||||
hidden = true;
|
hidden = false;
|
||||||
};
|
};
|
||||||
line-number = "relative";
|
line-number = "relative";
|
||||||
auto-format = true;
|
|
||||||
completion-timeout = 5;
|
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;
|
mouse = true;
|
||||||
bufferline = "multiple";
|
bufferline = "multiple";
|
||||||
|
popup-border = "none";
|
||||||
soft-wrap.enable = true;
|
soft-wrap.enable = true;
|
||||||
word-completion = {
|
word-completion = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -397,22 +387,26 @@ let
|
||||||
statusline = {
|
statusline = {
|
||||||
left = [
|
left = [
|
||||||
"spinner"
|
"spinner"
|
||||||
"version-control"
|
|
||||||
"diagnostics"
|
"diagnostics"
|
||||||
"file-name"
|
"file-name"
|
||||||
];
|
];
|
||||||
right = [
|
right = [
|
||||||
"file-base-name"
|
"file-base-name"
|
||||||
"file-type"
|
|
||||||
"position"
|
"position"
|
||||||
"file-encoding"
|
];
|
||||||
|
diagnostics = [
|
||||||
|
"warning"
|
||||||
|
"error"
|
||||||
|
];
|
||||||
|
workspace-diagnostics = [
|
||||||
|
"warning"
|
||||||
|
"error"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
gutters.layout = [
|
gutters.layout = [
|
||||||
"diff"
|
"diff"
|
||||||
"diagnostics"
|
"diagnostics"
|
||||||
"line-numbers"
|
"line-numbers"
|
||||||
"spacer"
|
|
||||||
];
|
];
|
||||||
inline-diagnostics = {
|
inline-diagnostics = {
|
||||||
cursor-line = "hint";
|
cursor-line = "hint";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue