nix-config/users/tacocat/helix/languages.nix

74 lines
1.7 KiB
Nix

{
pkgs,
lib,
...
}: {
programs.helix.languages = {
language = [
# {
# name = "bash";
# auto-format = false;
# formatter = {
# command = "${pkgs.shfmt}/bin/shfmt";
# args = ["-i" "2"];
# };
# }
{
name = "java";
language-servers = ["java-language-server"];
}
{
name = "latex";
indent.tab-width = 2;
indent.unit = "\t";
}
];
language-server = {
# bash-language-server = {
# command = "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server";
# args = ["start"];
# };
# clangd = {
# command = "${pkgs.clang-tools}/bin/clangd";
# clangd.fallbackFlags = ["-std=c++2b"];
# };
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
};
texlab = {
command = "${pkgs.texlab}/bin/texlab";
config.texlab = {
forwardSearch.executable = lib.getExe pkgs.zathura;
forwardSearch.args = ["--synctex-forward" "%l:1:%f"];
build = {
executable = lib.getExe pkgs.tectonic;
onSave = true;
auxDirectory = "build";
logDirectory = "build";
pdfDirectory = "build";
args = [
"-X"
"compile"
"%f"
"--keep-logs"
"--keep-intermediates"
"--outdir"
"build"
];
};
};
};
java-language-server = {
command = "${pkgs.java-language-server}/bin/java-language-server";
};
};
};
}