2024-06-12 13:23:20 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
helix-inline-diags,
|
|
|
|
...
|
|
|
|
}: {
|
2024-08-26 13:42:20 +02:00
|
|
|
home-manager.users.jade = {
|
|
|
|
pkgs,
|
|
|
|
pkgs-stable,
|
|
|
|
...
|
|
|
|
}: {
|
2023-11-14 12:22:19 +01:00
|
|
|
home = {
|
|
|
|
sessionVariables.EDITOR = "hx";
|
2023-11-26 21:26:49 +01:00
|
|
|
packages = [
|
|
|
|
pkgs.nil
|
2023-12-08 11:49:22 +01:00
|
|
|
pkgs.vscode-langservers-extracted
|
|
|
|
pkgs.nodePackages.typescript-language-server
|
|
|
|
pkgs.emmet-language-server
|
2024-08-26 13:42:20 +02:00
|
|
|
pkgs-stable.typst-lsp
|
2023-11-14 12:22:19 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
programs.helix = {
|
|
|
|
enable = true;
|
2024-10-11 08:51:11 +02:00
|
|
|
defaultEditor = true;
|
2024-06-12 13:23:20 +02:00
|
|
|
package = helix-inline-diags.outputs.packages."x86_64-linux".default;
|
2023-11-14 12:22:19 +01:00
|
|
|
settings = {
|
|
|
|
theme = "gruvbox";
|
|
|
|
editor = {
|
|
|
|
line-number = "relative";
|
2024-02-28 17:06:04 +01:00
|
|
|
bufferline = "multiple";
|
|
|
|
color-modes = true;
|
2024-03-14 16:04:08 +01:00
|
|
|
cursorline = true;
|
2024-04-16 21:35:32 +02:00
|
|
|
auto-save = true;
|
|
|
|
auto-format = true;
|
2024-06-12 13:23:20 +02:00
|
|
|
end-of-line-diagnostics = "hint";
|
|
|
|
inline-diagnostics = {
|
|
|
|
cursor-line = "hint";
|
|
|
|
other-lines = "error";
|
|
|
|
};
|
2024-02-28 17:06:04 +01:00
|
|
|
lsp = {
|
|
|
|
display-messages = true;
|
|
|
|
display-inlay-hints = true;
|
|
|
|
};
|
2024-04-03 19:04:00 +02:00
|
|
|
popup-border = "popup";
|
2024-02-28 17:06:04 +01:00
|
|
|
shell = ["nu" "-c"];
|
2024-03-14 16:04:08 +01:00
|
|
|
statusline.left = [
|
|
|
|
"mode"
|
|
|
|
"spinner"
|
|
|
|
"spacer"
|
|
|
|
"version-control"
|
|
|
|
"file-name"
|
|
|
|
"diagnostics"
|
|
|
|
"read-only-indicator"
|
|
|
|
"file-modification-indicator"
|
|
|
|
"spacer"
|
|
|
|
];
|
|
|
|
|
|
|
|
statusline.right = [
|
|
|
|
"workspace-diagnostics"
|
|
|
|
"register"
|
|
|
|
"position"
|
2024-04-03 17:55:59 +02:00
|
|
|
"selections"
|
2024-03-14 16:04:08 +01:00
|
|
|
"file-encoding"
|
|
|
|
"file-type"
|
|
|
|
];
|
2024-06-12 13:23:20 +02:00
|
|
|
idle-timeout = 50;
|
2023-11-22 11:47:26 +01:00
|
|
|
indent-guides = {
|
|
|
|
render = true;
|
|
|
|
character = "│";
|
|
|
|
};
|
|
|
|
whitespace = {
|
|
|
|
render = {
|
|
|
|
space = "all";
|
|
|
|
tab = "all";
|
|
|
|
newline = "none";
|
|
|
|
};
|
|
|
|
characters = {
|
|
|
|
space = "·";
|
|
|
|
nbsp = "⍽";
|
|
|
|
tab = "→";
|
|
|
|
};
|
|
|
|
};
|
2023-11-14 12:22:19 +01:00
|
|
|
};
|
2024-03-03 14:23:02 +01:00
|
|
|
keys = {
|
2024-03-03 14:27:38 +01:00
|
|
|
normal = {
|
|
|
|
space."=" = ":fmt";
|
|
|
|
};
|
|
|
|
insert = {
|
|
|
|
up = "no_op";
|
|
|
|
down = "no_op";
|
|
|
|
left = "no_op";
|
|
|
|
right = "no_op";
|
|
|
|
pageup = "no_op";
|
|
|
|
pagedown = "no_op";
|
|
|
|
home = "no_op";
|
|
|
|
end = "no_op";
|
|
|
|
};
|
2024-03-03 14:23:02 +01:00
|
|
|
};
|
2023-11-14 12:22:19 +01:00
|
|
|
};
|
|
|
|
languages = {
|
2024-02-28 17:06:04 +01:00
|
|
|
language-server = {
|
|
|
|
"nu-builtin-lsp" = {
|
|
|
|
command = "${config.users.defaultUserShell}/bin/nu";
|
|
|
|
args = ["--lsp"];
|
|
|
|
};
|
|
|
|
"rust-analyzer" = {
|
|
|
|
config = {
|
2024-04-16 21:35:32 +02:00
|
|
|
check.command = "check";
|
2024-02-28 17:06:04 +01:00
|
|
|
completion.snippets.custom = {
|
|
|
|
"pub fn" = {
|
|
|
|
prefix = ["pfn" "pubfn"];
|
|
|
|
postfix = ["pfn"];
|
|
|
|
body = [
|
|
|
|
"pub fn $\{receiver\}() {"
|
|
|
|
"\\t$1"
|
|
|
|
"}"
|
|
|
|
];
|
|
|
|
scope = "type";
|
|
|
|
};
|
|
|
|
};
|
2024-03-14 16:04:08 +01:00
|
|
|
completion.termSearch.enable = true;
|
|
|
|
diagnostics.enable = true;
|
|
|
|
inlayHints = {
|
|
|
|
bindingModeHints.enable = true;
|
|
|
|
closureCaptureHints.enable = true;
|
|
|
|
closureReturnTypeHints.enable = true;
|
|
|
|
discriminantHints.enable = true;
|
|
|
|
expressionAdjustmentHints = {
|
|
|
|
hideOutsideUnsafe = true;
|
|
|
|
};
|
|
|
|
lifetimeElisionHints.enable = "skip_trivial";
|
|
|
|
};
|
|
|
|
interpret.tests = true;
|
|
|
|
lens = {
|
|
|
|
references = {
|
|
|
|
adt.enable = true;
|
|
|
|
trait.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
typing.autoClosingAngleBrackets.enable = true;
|
2024-02-28 17:06:04 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
"emmet-language-server" = {
|
|
|
|
command = "emmet-language-server";
|
|
|
|
args = ["--stdio"];
|
|
|
|
};
|
2024-03-14 16:04:08 +01:00
|
|
|
"psalm" = {
|
|
|
|
command = "psalm";
|
|
|
|
args = ["--language-server"];
|
|
|
|
};
|
2024-02-28 17:06:04 +01:00
|
|
|
"typst-lsp" = {
|
|
|
|
config = {
|
|
|
|
exportPdf = "onType";
|
|
|
|
};
|
2023-11-14 12:22:19 +01:00
|
|
|
};
|
|
|
|
};
|
2023-11-20 01:29:52 +01:00
|
|
|
language = [
|
|
|
|
{
|
|
|
|
name = "nu";
|
2023-11-26 21:26:49 +01:00
|
|
|
language-servers = ["nu-builtin-lsp"];
|
2023-11-20 01:29:52 +01:00
|
|
|
}
|
2024-03-14 16:04:08 +01:00
|
|
|
{
|
|
|
|
name = "php";
|
|
|
|
language-servers = ["psalm"];
|
|
|
|
}
|
2023-11-26 21:34:14 +01:00
|
|
|
{
|
|
|
|
name = "nix";
|
|
|
|
formatter = {
|
|
|
|
command = "${pkgs.alejandra}/bin/alejandra";
|
|
|
|
args = ["--quiet"];
|
|
|
|
};
|
|
|
|
auto-format = true;
|
|
|
|
}
|
2023-12-08 11:49:22 +01:00
|
|
|
{
|
|
|
|
name = "html";
|
|
|
|
roots = [".git"];
|
2023-12-15 14:38:15 +01:00
|
|
|
language-servers = ["vscode-html-language-server" "emmet-language-server"];
|
|
|
|
auto-format = false;
|
2023-12-08 11:49:22 +01:00
|
|
|
}
|
2023-11-20 01:29:52 +01:00
|
|
|
];
|
2023-11-14 12:22:19 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|