NOflake/users/tao/helix.nix

185 lines
4.3 KiB
Nix
Raw Normal View History

2024-02-24 02:30:17 -08:00
{
inputs,
pkgs,
...
}: {
2024-01-30 10:46:26 -08:00
programs.helix = {
settings = {
theme = "dracula";
editor = {
2024-04-02 18:11:12 -07:00
# rainbow-brackets = true;
2024-01-30 10:46:26 -08:00
line-number = "relative";
cursorline = true;
completion-replace = true;
preview-completion-insert = false;
indent-guides = {
render = true;
skip-levels = 2;
};
cursor-shape = {
insert = "bar";
select = "underline";
};
statusline = {
2024-02-24 02:30:17 -08:00
left = ["mode" "spinner" "spacer" "version-control"];
center = ["file-name" "file-modification-indicator"];
right = ["diagnostics" "primary-selection-length" "total-line-numbers" "selections" "position"];
2024-01-30 10:46:26 -08:00
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
2024-01-31 17:34:09 -08:00
soft-wrap.enable = true;
2024-03-29 12:51:49 -07:00
smart-tab.supersede-menu = false;
2024-01-30 10:46:26 -08:00
};
2024-02-21 18:15:57 -08:00
keys.normal = {
k = "move_line_down";
j = "move_line_up";
};
keys.select = {
2024-02-27 10:26:58 -08:00
k = "extend_line_down";
j = "extend_line_up";
2024-02-21 18:15:57 -08:00
};
2024-01-30 10:46:26 -08:00
};
languages = {
language = [
2024-04-12 14:46:13 -07:00
{
name = "arduino";
scope = "source.arduino";
injection-regex = "arduino";
file-types = ["ino" "cpp" "h"];
comment-token = "//";
roots = ["*.ino" "sketch.yaml"];
language-servers = ["arduino-language-server"];
indent = {
tab-width = 8;
unit = "\t";
};
auto-format = true;
formatter = {command = "clang-format";};
}
2024-01-30 10:46:26 -08:00
{
name = "c";
auto-format = true;
formatter = {
command = "clang-format";
2024-02-24 02:30:17 -08:00
args = ["--style=file:/home/tao/Templates/clang-format"];
};
indent = {
tab-width = 8;
unit = "\t";
2024-01-30 10:46:26 -08:00
};
}
2024-04-11 08:32:50 -07:00
{
name = "cpp";
auto-format = true;
formatter = {
command = "clang-format";
args = ["--style=file:/home/tao/Templates/clang-format"];
};
2024-04-12 14:46:13 -07:00
file-types = [
"cc"
"hh"
"c++"
"cpp"
"hpp"
"h"
"ipp"
"tpp"
"cxx"
"hxx"
"ixx"
"txx"
"C"
"H"
"cu"
"cuh"
"cppm"
"h++"
"ii"
"inl"
{glob = ".hpp.in";}
{glob = ".h.in";}
];
2024-04-11 08:32:50 -07:00
indent = {
tab-width = 8;
unit = "\t";
};
}
2024-02-21 18:15:57 -08:00
# { name = "css"; comment = "/*"; }
2024-02-24 02:30:17 -08:00
{
name = "html";
auto-format = false;
indent = {
tab-width = 4;
unit = "\t";
};
}
{
name = "java";
auto-format = true;
indent = {
tab-width = 4;
unit = "\t";
};
}
2024-03-03 23:17:20 -08:00
{
name = "javascript";
auto-format = true;
indent = {
tab-width = 4;
unit = "\t";
};
}
2024-02-24 02:30:17 -08:00
{
name = "nix";
auto-format = true;
formatter = {command = "alejandra";};
}
{
name = "typst";
indent = {
tab-width = 4;
unit = " ";
};
2024-04-11 08:32:50 -07:00
text-width = 100;
}
2024-01-30 10:46:26 -08:00
];
2024-02-19 22:41:58 -08:00
language-servers = {
rust-analyzer.config = {
procMacro = {
ignored = {
leptos_macro = [
# Optional:
# "component",
"server"
];
};
};
};
};
2024-02-26 23:22:48 -08:00
language-server = {
jdtls = {
command = "jdtls";
args = ["-data" "/home/tao/.cache/jdtls/workspace"];
};
2024-04-12 14:46:13 -07:00
arduino-language-server = {
command = "arduino-language-server";
};
2024-02-26 23:22:48 -08:00
};
2024-02-01 19:24:36 -08:00
grammar = [
2024-04-12 14:46:13 -07:00
{
name = "arduino";
source = {
git = "https://github.com/ObserverOfTime/tree-sitter-arduino";
rev = "db929fc6822b9b9e1211678d508f187894ce0345";
};
}
2024-02-01 19:24:36 -08:00
];
2024-01-30 10:46:26 -08:00
};
2024-01-30 11:08:42 -08:00
enable = true;
defaultEditor = true;
2024-04-02 18:11:12 -07:00
# package = inputs.helix.packages.${pkgs.system}.default;
2024-01-30 10:46:26 -08:00
};
}