nix-config/users/tacocat/helix/languages.nix
Aria Nolan f8d18dfb8b help
2023-10-20 20:49:53 -04:00

57 lines
1.2 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" ];
}
];
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.executable = "${pkgs.tectonic}/bin/tectonic";
config.texlab.build.onSave = true;
config.texlab.args = [
"-X"
"compile"
"%f"
"--keep-logs"
"--keep-intermediates"
];
};
java-language-server = {
command = "${pkgs.java-language-server}/bin/java-language-server";
};
};
};
}