nixdots/home/programs/terminal/editors/helix/default.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-26 22:10:00 +00:00
{pkgs, ...}: {
programs.helix = {
enable = true;
settings = {
theme = "tokyonight";
editor = {
line-number = "relative";
2024-07-26 23:48:45 +00:00
bufferline = "multiple";
cursor-shape.insert = "bar";
2024-07-26 22:10:00 +00:00
lsp.display-messages = true;
};
2024-07-26 23:48:45 +00:00
keys = {
normal = {
esc = ["collapse_selection" "keep_primary_selection"];
};
};
2024-07-26 22:10:00 +00:00
};
languages = {
language = [
{
name = "python";
scope = "source.python";
injection-regex = "python";
file-types = ["py" "pyi" "py3" "pyw" ".pythonstartup" ".pythonrc"];
shebangs = ["python"];
roots = ["." "pyproject.toml" "pyrightconfig.json"];
comment-token = "#";
language-servers = ["basedpyright" "ruff"];
indent = {
tab-width = 4;
unit = " ";
};
auto-format = true;
}
];
language-server = {
ruff = {
command = "ruff-lsp";
};
basedpyright = {
command = "basedpyright-langserver";
args = ["--stdio"];
};
};
};
};
}