2024-04-27 14:40:15 +02:00
|
|
|
{
|
|
|
|
config,
|
2024-04-27 14:55:46 +02:00
|
|
|
lib,
|
2024-04-27 14:40:15 +02:00
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
programs.helix = {
|
2024-04-27 14:42:23 +02:00
|
|
|
enable = true;
|
2024-04-27 14:55:46 +02:00
|
|
|
defaultEditor = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
theme = "catppuccin_macchiato";
|
|
|
|
editor = {
|
|
|
|
line-number = "relative";
|
|
|
|
lsp.display-messages = true;
|
2024-04-30 15:25:34 +02:00
|
|
|
lsp.display-inlay-hints = true;
|
2024-04-27 14:55:46 +02:00
|
|
|
cursor-shape = {
|
|
|
|
insert = "bar";
|
|
|
|
normal = "block";
|
|
|
|
select = "underline";
|
|
|
|
};
|
|
|
|
cursorline = true;
|
|
|
|
bufferline = "always";
|
|
|
|
color-modes = true;
|
|
|
|
soft-wrap = {
|
|
|
|
enable = true;
|
|
|
|
max-wrap = 25;
|
|
|
|
wrap-indicator = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
languages = {
|
|
|
|
language = [
|
|
|
|
{
|
|
|
|
name = "python";
|
|
|
|
language-id = "python";
|
2024-04-27 16:26:15 +02:00
|
|
|
auto-format = true;
|
2024-04-27 14:55:46 +02:00
|
|
|
file-types = ["py"];
|
2024-05-01 23:27:11 +02:00
|
|
|
language-servers = ["ruff" "scls"];
|
2024-04-27 14:55:46 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "typst";
|
|
|
|
language-id = "typst";
|
|
|
|
auto-format = false;
|
|
|
|
file-types = ["typ"];
|
2024-05-01 23:27:11 +02:00
|
|
|
language-servers = ["typst-lsp" "scls"];
|
2024-04-27 14:55:46 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "rust";
|
|
|
|
language-id = "rust";
|
|
|
|
auto-format = true;
|
|
|
|
file-types = ["rs"];
|
|
|
|
roots = ["Cargo.lock"];
|
2024-05-01 23:27:11 +02:00
|
|
|
language-servers = ["rust-analyzer" "scls"];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "stub";
|
|
|
|
scope = "text.stub";
|
|
|
|
file-types = [];
|
|
|
|
shebangs = [];
|
|
|
|
roots = [];
|
|
|
|
auto-format = false;
|
|
|
|
language-servers = ["scls"];
|
2024-04-27 14:55:46 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "nix";
|
|
|
|
language-id = "nix";
|
|
|
|
auto-format = true;
|
|
|
|
file-types = ["nix"];
|
|
|
|
roots = ["flake.lock" "flake.nix"];
|
2024-05-01 23:33:03 +02:00
|
|
|
language-servers = ["nil" "scls"];
|
2024-04-27 14:55:46 +02:00
|
|
|
formatter = {
|
2024-04-29 15:57:41 +02:00
|
|
|
command = "alejandra";
|
|
|
|
args = ["-q"];
|
2024-04-27 14:55:46 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
language-server = {
|
2024-04-27 16:43:54 +02:00
|
|
|
ruff = {
|
|
|
|
command = "ruff-lsp";
|
2024-04-27 14:55:46 +02:00
|
|
|
};
|
|
|
|
typst-lsp = {
|
|
|
|
command = "typst-lsp";
|
|
|
|
};
|
|
|
|
rust-analyzer = {
|
|
|
|
command = "rust-analyzer";
|
|
|
|
};
|
|
|
|
nil = {
|
|
|
|
command = "nil";
|
|
|
|
};
|
2024-05-01 23:27:11 +02:00
|
|
|
scls = {
|
|
|
|
command = "simple-completion-language-server";
|
|
|
|
config = {
|
|
|
|
max_completion_items = 20;
|
|
|
|
snippets_first = true;
|
|
|
|
feature_words = true;
|
|
|
|
feature_snippets = true;
|
|
|
|
feature_unicode_input = true;
|
|
|
|
feature_paths = true;
|
|
|
|
};
|
|
|
|
};
|
2024-04-27 14:55:46 +02:00
|
|
|
};
|
|
|
|
};
|
2024-04-27 14:40:15 +02:00
|
|
|
};
|
2024-05-01 23:27:11 +02:00
|
|
|
home.file = {
|
|
|
|
"helix" = {
|
|
|
|
source = ./snippets.toml;
|
|
|
|
target = ".config/helix/external-snippets.toml";
|
|
|
|
};
|
|
|
|
};
|
2024-04-27 14:40:15 +02:00
|
|
|
}
|