2024-09-01 21:37:24 +02:00
|
|
|
{
|
|
|
|
config,
|
2024-11-01 14:13:48 +01:00
|
|
|
inputs',
|
2024-09-01 21:37:24 +02:00
|
|
|
lib,
|
2024-09-16 21:02:01 +02:00
|
|
|
pkgs,
|
2024-09-01 21:37:24 +02:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.modules.system.programs.editors.helix;
|
|
|
|
inherit (config.modules.other.system) username;
|
2024-09-20 15:45:44 +02:00
|
|
|
inherit (lib) mkIf getExe;
|
2024-11-01 14:13:48 +01:00
|
|
|
inherit (inputs'.helix.packages) helix;
|
|
|
|
wrapped-helix = pkgs.symlinkJoin {
|
|
|
|
name = "helix-wrapped";
|
|
|
|
paths = with pkgs; [
|
|
|
|
helix
|
|
|
|
|
|
|
|
# C/C++
|
|
|
|
clang-tools
|
|
|
|
|
|
|
|
# Markdown
|
|
|
|
marksman
|
|
|
|
|
|
|
|
# Nix
|
|
|
|
nil
|
|
|
|
lldb_19
|
|
|
|
# Bash
|
|
|
|
bash-language-server
|
|
|
|
|
|
|
|
# Shell
|
|
|
|
shellcheck
|
|
|
|
];
|
|
|
|
};
|
2024-09-01 21:37:24 +02:00
|
|
|
in {
|
2024-09-01 22:10:02 +02:00
|
|
|
imports = [./languages.nix];
|
2024-09-01 21:37:24 +02:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home-manager.users.${username} = {
|
|
|
|
programs.helix = {
|
|
|
|
enable = true;
|
2024-11-01 14:13:48 +01:00
|
|
|
package = wrapped-helix;
|
2024-09-12 14:59:39 +02:00
|
|
|
|
2024-09-01 21:37:24 +02:00
|
|
|
settings = {
|
2024-09-29 22:35:41 +02:00
|
|
|
theme = "catppuccin_mocha";
|
2024-09-01 21:37:24 +02:00
|
|
|
editor = {
|
2024-10-06 12:48:43 +02:00
|
|
|
cursorline = false;
|
2024-09-01 21:37:24 +02:00
|
|
|
color-modes = true;
|
|
|
|
indent-guides.render = true;
|
2024-09-22 19:43:30 +02:00
|
|
|
lsp = {
|
|
|
|
display-inlay-hints = true;
|
|
|
|
display-messages = true;
|
|
|
|
};
|
2024-09-01 21:37:24 +02:00
|
|
|
line-number = "relative";
|
|
|
|
true-color = true;
|
2024-09-03 15:20:49 +02:00
|
|
|
auto-format = true;
|
|
|
|
completion-timeout = 5;
|
2024-09-01 21:37:24 +02:00
|
|
|
mouse = true;
|
|
|
|
bufferline = "multiple";
|
|
|
|
soft-wrap.enable = true;
|
|
|
|
cursor-shape = {insert = "bar";};
|
2024-09-22 19:43:30 +02:00
|
|
|
statusline = {
|
|
|
|
left = ["spinner" "version-control" "diagnostics" "file-name"];
|
|
|
|
right = ["file-base-name" "file-type" "selections" "position" "file-encoding"];
|
|
|
|
};
|
|
|
|
gutters.layout = ["diff" "diagnostics" "line-numbers" "spacer"];
|
2024-09-01 21:37:24 +02:00
|
|
|
inline-diagnostics = {
|
|
|
|
cursor-line = "hint";
|
|
|
|
other-lines = "error";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
keys.normal = {
|
2024-10-25 12:35:38 +02:00
|
|
|
space.g = [":new" ":insert-output ${getExe pkgs.lazygit}" ":buffer-close!" ":redraw"];
|
2024-09-22 19:43:30 +02:00
|
|
|
esc = ["collapse_selection" "keep_primary_selection" "normal_mode"];
|
2024-09-01 21:37:24 +02:00
|
|
|
A-H = "goto_previous_buffer";
|
|
|
|
A-L = "goto_next_buffer";
|
|
|
|
A-w = ":buffer-close";
|
|
|
|
A-f = ":format";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|