snowflake/home/programs/editors/helix/languages.nix

58 lines
1.3 KiB
Nix
Raw Normal View History

2023-05-25 12:43:26 -04:00
{
pkgs,
lib,
...
}: {
programs.helix.languages = {
language = with pkgs; [
{
name = "nix";
auto-format = true;
formatter = {
command = lib.getExe alejandra;
args = ["-q"];
};
}
{
name = "rust";
auto-format = true;
2024-05-26 16:49:29 -04:00
language-servers = [
"rust-analyzer"
];
2023-05-25 12:43:26 -04:00
formatter = {
command = lib.getExe rustfmt;
2024-05-26 16:49:29 -04:00
args = ["--edition" "2021"];
2023-05-25 12:43:26 -04:00
};
}
2024-01-26 08:05:25 -05:00
{
name = "lua";
auto-format = true;
formatter = {
command = lib.getExe stylua;
2024-01-26 08:05:25 -05:00
};
}
2023-05-25 12:43:26 -04:00
];
language-server = with pkgs; {
nil = {
command = lib.getExe nil;
};
vscode-css-language-server = {
command = "${nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = ["--stdio"];
};
2024-05-26 16:49:29 -04:00
typescript-language-server = with pkgs.nodePackages; {
command = "${typescript-language-server}/bin/typescript-language-server";
args = ["--stdio"];
};
rust-analyzer.config = {
checkOnSave.command = "clippy";
inlayHints = {
closingBraceHints.enable = false;
parameterHints.enable = false;
typeHints.enable = true;
};
};
2023-05-25 12:43:26 -04:00
};
};
}