2024-07-24 09:26:00 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
config = lib.mkIf config.ar.home.apps.helix.enable {
|
|
|
|
programs.helix = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
languages = {
|
|
|
|
language-server = {
|
|
|
|
rust-analyzer.config = {
|
|
|
|
checkOnSave.command = "clippy";
|
|
|
|
cargo.features = "all";
|
|
|
|
cargo.unsetTest = [];
|
|
|
|
};
|
|
|
|
|
|
|
|
pyright = {
|
|
|
|
command = "${pkgs.pyright}/bin/pyright-langserver";
|
|
|
|
args = ["--stdio"];
|
|
|
|
config = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
nil.command = "${pkgs.nil}/bin/nil";
|
|
|
|
|
|
|
|
bash-language-server = {
|
|
|
|
command = "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server";
|
|
|
|
args = ["start"];
|
|
|
|
};
|
|
|
|
|
|
|
|
haskell = {
|
|
|
|
command = "${pkgs.haskell-language-server}/bin/haskell-language-server-wrapper";
|
|
|
|
args = ["lsp"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
language = [
|
|
|
|
{
|
|
|
|
name = "python";
|
|
|
|
auto-format = true;
|
|
|
|
language-servers = [{name = "pyright";}];
|
|
|
|
formatter = {
|
|
|
|
command = "/bin/sh";
|
|
|
|
args = ["-c" "${pkgs.isort}/bin/isort - | ${pkgs.black}/bin/black -q -l 120 -C -"];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "nix";
|
|
|
|
auto-format = true;
|
|
|
|
language-servers = [{name = "nil";}];
|
|
|
|
formatter.command = "${pkgs.alejandra}/bin/alejandra";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "bash";
|
|
|
|
auto-format = true;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "haskell";
|
|
|
|
auto-format = true;
|
|
|
|
language-servers = [{name = "haskell";}];
|
|
|
|
formatter = {
|
|
|
|
command = "${pkgs.ormolu}/bin/ormolu";
|
|
|
|
args = ["--no-cabal"];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
theme = "adwaita-dark";
|
|
|
|
editor = {
|
2024-07-27 22:15:39 -04:00
|
|
|
auto-completion = true;
|
|
|
|
auto-format = true;
|
|
|
|
auto-pairs = false;
|
|
|
|
auto-save = true;
|
2024-07-24 09:26:00 -04:00
|
|
|
color-modes = true;
|
|
|
|
cursorline = true;
|
|
|
|
|
|
|
|
cursor-shape = {
|
|
|
|
insert = "bar";
|
|
|
|
normal = "block";
|
|
|
|
select = "underline";
|
|
|
|
};
|
|
|
|
|
|
|
|
indent-guides.render = true;
|
|
|
|
|
|
|
|
lsp = {
|
|
|
|
display-inlay-hints = true;
|
|
|
|
display-messages = true;
|
|
|
|
};
|
|
|
|
|
2024-07-27 22:15:39 -04:00
|
|
|
soft-wrap = {
|
|
|
|
enable = true;
|
|
|
|
wrap-at-text-width = true;
|
|
|
|
};
|
|
|
|
|
2024-07-24 09:26:00 -04:00
|
|
|
statusline.center = ["position-percentage"];
|
2024-07-27 22:15:39 -04:00
|
|
|
text-width = 80;
|
2024-07-24 09:26:00 -04:00
|
|
|
true-color = true;
|
2024-07-27 22:15:39 -04:00
|
|
|
|
2024-07-24 09:26:00 -04:00
|
|
|
whitespace.characters = {
|
|
|
|
newline = "↴";
|
|
|
|
tab = "⇥";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|