2024-09-25 20:24:56 +00:00
|
|
|
{
|
|
|
|
pkgs ? import <nixpkgs> { },
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
ignore = [
|
|
|
|
".idea/"
|
|
|
|
"result"
|
|
|
|
"node_modules/"
|
|
|
|
"dist/"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
settings = {
|
|
|
|
theme = "catppuccin_mocha_transparent";
|
|
|
|
editor = {
|
|
|
|
line-number = "relative";
|
|
|
|
mouse = false;
|
|
|
|
bufferline = "always";
|
|
|
|
color-modes = true;
|
|
|
|
cursor-shape = {
|
|
|
|
insert = "bar";
|
|
|
|
normal = "block";
|
|
|
|
select = "underline";
|
|
|
|
};
|
2024-02-16 17:35:29 +00:00
|
|
|
file-picker.hidden = false;
|
2023-09-21 04:48:43 +00:00
|
|
|
indent-guides = {
|
|
|
|
render = true;
|
|
|
|
skip-levels = 1;
|
|
|
|
};
|
2024-02-16 17:35:29 +00:00
|
|
|
soft-wrap.enable = true;
|
2023-09-21 04:48:43 +00:00
|
|
|
statusline = {
|
|
|
|
right = [
|
|
|
|
"version-control"
|
|
|
|
"diagnostics"
|
|
|
|
"selections"
|
|
|
|
"position"
|
|
|
|
"file-encoding"
|
|
|
|
];
|
|
|
|
};
|
2024-02-16 17:35:29 +00:00
|
|
|
lsp.display-messages = true;
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
keys = {
|
|
|
|
normal = {
|
|
|
|
space = {
|
|
|
|
q = ":quit";
|
|
|
|
Q = ":quit!";
|
|
|
|
w = ":write";
|
|
|
|
W = ":write!";
|
|
|
|
};
|
|
|
|
C-c = ":config-open";
|
|
|
|
C-r = ":config-reload";
|
|
|
|
"C-/" = "toggle_comments";
|
|
|
|
S-right = "goto_next_buffer";
|
|
|
|
S-left = "goto_previous_buffer";
|
|
|
|
C-b = ":buffer-close";
|
2024-09-25 20:24:56 +00:00
|
|
|
C-s = [
|
|
|
|
"select_all"
|
|
|
|
"select_regex"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
|
|
|
|
C-j = "shrink_selection";
|
|
|
|
C-k = "expand_selection";
|
|
|
|
C-l = "select_next_sibling";
|
|
|
|
C-a = "select_all";
|
2024-09-25 20:24:56 +00:00
|
|
|
C-u = [
|
|
|
|
"half_page_up"
|
|
|
|
"align_view_center"
|
|
|
|
];
|
|
|
|
C-d = [
|
|
|
|
"half_page_down"
|
|
|
|
"align_view_center"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
"{" = [
|
|
|
|
"goto_prev_paragraph"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
"}" = [
|
|
|
|
"goto_next_paragraph"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
"0" = "goto_line_start";
|
|
|
|
"$" = "goto_line_end";
|
|
|
|
"^" = "goto_first_nonwhitespace";
|
|
|
|
G = "goto_file_end";
|
|
|
|
"%" = "match_brackets";
|
2024-09-25 20:24:56 +00:00
|
|
|
V = [
|
|
|
|
"select_mode"
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
];
|
|
|
|
C = [
|
|
|
|
"collapse_selection"
|
|
|
|
"extend_to_line_end"
|
|
|
|
"change_selection"
|
|
|
|
];
|
|
|
|
D = [
|
|
|
|
"extend_to_line_end"
|
|
|
|
"delete_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
S = "surround_add";
|
|
|
|
|
|
|
|
d = {
|
2024-09-25 20:24:56 +00:00
|
|
|
d = [
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"delete_selection"
|
|
|
|
];
|
|
|
|
t = [ "extend_till_char" ];
|
|
|
|
s = [ "surround_delete" ];
|
|
|
|
i = [ "select_textobject_inner" ];
|
|
|
|
a = [ "select_textobject_around" ];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
x = "delete_selection";
|
|
|
|
p = "paste_clipboard_after";
|
|
|
|
P = "paste_clipboard_before";
|
|
|
|
y = [
|
|
|
|
"yank_main_selection_to_clipboard"
|
|
|
|
"normal_mode"
|
|
|
|
"flip_selections"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
Y = [
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"yank_main_selection_to_clipboard"
|
|
|
|
"goto_line_start"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
w = [
|
|
|
|
"move_next_word_start"
|
|
|
|
"move_char_right"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
e = [
|
|
|
|
"move_next_word_end"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
b = [
|
|
|
|
"move_prev_word_start"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
i = [
|
|
|
|
"insert_mode"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
a = [
|
|
|
|
"append_mode"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
esc = [
|
|
|
|
"collapse_selection"
|
|
|
|
"keep_primary_selection"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
insert = {
|
|
|
|
esc = [
|
|
|
|
"collapse_selection"
|
|
|
|
"normal_mode"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
select = {
|
|
|
|
space = {
|
|
|
|
j = {
|
|
|
|
e = ":pipe jq";
|
|
|
|
c = ":pipe jq -c";
|
|
|
|
};
|
|
|
|
};
|
2024-09-25 20:24:56 +00:00
|
|
|
"{" = [
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"goto_prev_paragraph"
|
|
|
|
];
|
|
|
|
"}" = [
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"goto_next_paragraph"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
"0" = "goto_line_start";
|
|
|
|
"$" = "goto_line_end";
|
|
|
|
"^" = "goto_first_nonwhitespace";
|
|
|
|
G = "goto_file_end";
|
2024-09-25 20:24:56 +00:00
|
|
|
D = [
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"delete_selection"
|
|
|
|
"normal_mode"
|
|
|
|
];
|
|
|
|
C = [
|
|
|
|
"goto_line_start"
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"change_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
"%" = "match_brackets";
|
|
|
|
S = "surround_add";
|
|
|
|
|
|
|
|
i = "select_textobject_inner";
|
|
|
|
a = "select_textobject_around";
|
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
tab = [
|
|
|
|
"insert_mode"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
C-a = [
|
|
|
|
"append_mode"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
k = [
|
|
|
|
"extend_line_up"
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
];
|
|
|
|
j = [
|
|
|
|
"extend_line_down"
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
d = [
|
|
|
|
"yank_main_selection_to_clipboard"
|
|
|
|
"delete_selection"
|
|
|
|
];
|
|
|
|
x = [
|
|
|
|
"yank_main_selection_to_clipboard"
|
|
|
|
"delete_selection"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
y = [
|
|
|
|
"yank_main_selection_to_clipboard"
|
|
|
|
"normal_mode"
|
|
|
|
"flip_selections"
|
|
|
|
"collapse_selection"
|
|
|
|
];
|
|
|
|
Y = [
|
|
|
|
"extend_to_line_bounds"
|
|
|
|
"yank_main_selection_to_clipboard"
|
|
|
|
"goto_line_start"
|
|
|
|
"collapse_selection"
|
|
|
|
"normal_mode"
|
|
|
|
];
|
|
|
|
p = "replace_selections_with_clipboard";
|
|
|
|
P = "paste_clipboard_before";
|
|
|
|
|
2024-09-25 20:24:56 +00:00
|
|
|
esc = [
|
|
|
|
"collapse_selection"
|
|
|
|
"keep_primary_selection"
|
|
|
|
"normal_mode"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
languages = with pkgs; {
|
|
|
|
language = [
|
|
|
|
{
|
|
|
|
name = "go";
|
|
|
|
formatter = {
|
2023-09-21 22:49:31 +00:00
|
|
|
command = "sh";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [
|
|
|
|
"-c"
|
|
|
|
"set -o pipefail; ${gotools}/bin/goimports | ${gofumpt}/bin/gofumpt"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "python";
|
|
|
|
auto-format = true;
|
|
|
|
formatter = with python311Packages; {
|
|
|
|
command = "${black}/bin/black";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [
|
|
|
|
"--quiet"
|
|
|
|
"-"
|
|
|
|
];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "nix";
|
|
|
|
auto-format = true;
|
|
|
|
formatter = {
|
2024-08-01 18:31:57 +00:00
|
|
|
command = "${nixfmt-rfc-style}/bin/nixfmt";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [ "-q" ];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "templ";
|
|
|
|
auto-format = true;
|
|
|
|
formatter = {
|
2023-11-07 20:59:39 +00:00
|
|
|
command = "${templ}/bin/templ";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [ "fmt" ];
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
}
|
2023-10-14 23:31:46 +00:00
|
|
|
{
|
|
|
|
name = "typst";
|
|
|
|
auto-format = true;
|
|
|
|
formatter.command = "${typst-fmt}/bin/typstfmt";
|
|
|
|
}
|
2024-06-03 19:39:46 +00:00
|
|
|
{
|
|
|
|
name = "dhall";
|
|
|
|
auto-format = true;
|
|
|
|
formatter = {
|
|
|
|
command = "${dhall}/bin/dhall";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [ "format" ];
|
2024-06-03 19:39:46 +00:00
|
|
|
};
|
|
|
|
}
|
2024-07-23 03:13:19 +00:00
|
|
|
{
|
|
|
|
name = "jsonnet";
|
|
|
|
auto-format = true;
|
|
|
|
formatter = {
|
|
|
|
command = "${jsonnet}/bin/jsonnetfmt";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [ "-" ];
|
2024-07-23 03:13:19 +00:00
|
|
|
};
|
|
|
|
}
|
2024-09-25 20:24:56 +00:00
|
|
|
{
|
|
|
|
name = "cooklang";
|
|
|
|
scope = "source.cook";
|
|
|
|
injection-regex = "cook";
|
|
|
|
file-types = [ "cook" ];
|
|
|
|
}
|
2023-09-21 04:48:43 +00:00
|
|
|
];
|
2023-11-07 20:59:39 +00:00
|
|
|
language-server = {
|
|
|
|
nil.config.nil.nix.flake.autoEvalInputs = true;
|
2024-02-25 18:32:30 +00:00
|
|
|
gpt = {
|
|
|
|
command = "${helix-gpt}";
|
2024-09-25 20:24:56 +00:00
|
|
|
args = [ "--handler=codeium" ];
|
2024-02-25 18:32:30 +00:00
|
|
|
};
|
2023-11-07 20:59:39 +00:00
|
|
|
};
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
themes = {
|
|
|
|
catppuccin_frappe_transparent = {
|
|
|
|
inherits = "catppuccin_frappe";
|
2024-09-25 20:24:56 +00:00
|
|
|
"ui.background" = { };
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
catppuccin_latte_transparent = {
|
|
|
|
inherits = "catppuccin_latte";
|
2024-09-25 20:24:56 +00:00
|
|
|
"ui.background" = { };
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
catppuccin_macchiato_transparent = {
|
|
|
|
inherits = "catppuccin_macchiato";
|
2024-09-25 20:24:56 +00:00
|
|
|
"ui.background" = { };
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
catppuccin_mocha_transparent = {
|
|
|
|
inherits = "catppuccin_mocha";
|
2024-09-25 20:24:56 +00:00
|
|
|
"ui.background" = { };
|
2023-09-21 04:48:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
grammars = [
|
2024-09-25 20:24:56 +00:00
|
|
|
{
|
|
|
|
name = "cooklang";
|
|
|
|
url = "https://github.com/jolheiser/tree-sitter-cooklang";
|
|
|
|
rev = "a87b94729c0e4276a3e7b9fdccf497c268a2e1b8";
|
|
|
|
sha256 = "sha256-j6WD1+WVTLlq0x0WkFWWR8JHYk2jObSRDNEz6SUWovw=";
|
|
|
|
queries = "queries";
|
|
|
|
}
|
2023-09-21 04:48:43 +00:00
|
|
|
];
|
|
|
|
}
|