modules/home/programs/editor/helix.nix: add keybind, change lsp

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-03-19 23:42:43 +02:00
parent 620bb5c70a
commit b21320ce2a

View File

@ -39,54 +39,46 @@ in {
wrap-indicator = "";
};
};
keys.normal = {
space = {
space = "file_picker";
w = ":w";
q = ":q";
x = ":x";
n = ":n";
"," = "goto_previous_buffer";
"." = "goto_next_buffer";
l = ":reflow";
keys = {
insert.C-c = "normal_mode";
normal = {
esc = ["collapse_selection" "keep_primary_selection"];
space = {
space = "file_picker";
w = ":w";
q = ":q";
x = ":x";
n = ":n";
"," = "goto_previous_buffer";
"." = "goto_next_buffer";
l = ":reflow";
};
};
esc = ["collapse_selection" "keep_primary_selection"];
};
};
languages = {
language-server = {
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
};
rust-analyzer = {
command = "${pkgs.rust-analyzer}/bin/rust-analyzer";
};
texlab = {
command = "${pkgs.texlab}/bin/texlab";
};
nil = {
command = "${pkgs.nil}/bin/nil";
};
markdown-oxide = {
command = "${pkgs.markdown-oxide}/bin/markdown-oxide";
};
tinymist = {
command = lib.getExe pkgs.tinymist;
};
language-server = with lib; {
clangd.command = "${pkgs.clang-tools}/bin/clangd";
markdown-oxide.command = getExe pkgs.markdown-oxide;
nil.command = getExe pkgs.nil;
nixd.command = getExe pkgs.nixd;
rust-analyzer.command = getExe pkgs.rust-analyzer;
# texlab.command = getExe pkgs.texlab;
tinymist.command = getExe pkgs.tinymist;
};
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.alejandra}/bin/alejandra";
language-servers = ["nil"];
}
{
name = "latex";
auto-format = true;
formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent";
language-servers = ["texlab"];
language-servers = ["nixd"];
}
# {
# name = "latex";
# auto-format = true;
# formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent";
# language-servers = ["texlab"];
# }
{
name = "typst";
auto-format = true;