2022-12-07 16:20:15 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
language-servers = {
|
|
|
|
inherit
|
|
|
|
(pkgs.nodePackages)
|
|
|
|
typescript-language-server
|
|
|
|
vscode-json-languageserver-bin
|
|
|
|
vscode-html-languageserver-bin
|
|
|
|
vscode-css-languageserver-bin
|
|
|
|
;
|
|
|
|
inherit (pkgs.python3Packages) python-lsp-server;
|
|
|
|
inherit
|
|
|
|
(pkgs)
|
|
|
|
rust-analyzer
|
|
|
|
taplo
|
|
|
|
# toml
|
|
|
|
|
|
|
|
nil
|
|
|
|
# nix
|
|
|
|
|
|
|
|
texlab
|
|
|
|
# latex
|
|
|
|
|
|
|
|
lean
|
|
|
|
yaml-language-server
|
2022-12-30 20:41:45 +00:00
|
|
|
ltex-ls
|
2022-12-07 16:20:15 +00:00
|
|
|
;
|
2022-12-30 20:41:45 +00:00
|
|
|
# languagetool support for markdown
|
2022-12-07 16:20:15 +00:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
home = {
|
|
|
|
packages = builtins.attrValues language-servers;
|
|
|
|
sessionVariables = {
|
|
|
|
EDITOR = "hx";
|
|
|
|
VISUAL = "hx";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
programs.helix = {
|
|
|
|
enable = true;
|
2023-01-01 13:56:14 +00:00
|
|
|
themes.mytheme = {
|
|
|
|
inherits = "catppuccin_latte";
|
|
|
|
"diagnostic.info".underline = {
|
|
|
|
color = "blue";
|
|
|
|
style = "curl";
|
|
|
|
};
|
|
|
|
"diagnostic.hint".underline = {
|
|
|
|
color = "green";
|
|
|
|
style = "curl";
|
|
|
|
};
|
|
|
|
"diagnostic.warning".underline = {
|
2023-01-02 00:02:25 +00:00
|
|
|
color = "peach";
|
2023-01-01 13:56:14 +00:00
|
|
|
style = "curl";
|
|
|
|
};
|
|
|
|
"diagnostic.error".underline = {
|
2023-01-02 00:02:25 +00:00
|
|
|
color = "maroon";
|
2023-01-01 13:56:14 +00:00
|
|
|
style = "curl";
|
|
|
|
};
|
|
|
|
};
|
2022-12-07 16:20:15 +00:00
|
|
|
settings = {
|
2023-01-01 13:56:14 +00:00
|
|
|
theme = "mytheme";
|
2022-12-07 16:20:15 +00:00
|
|
|
keys = let
|
|
|
|
common_keys = {
|
|
|
|
"C-s" = ":w";
|
|
|
|
"C-f" = ":format";
|
|
|
|
};
|
|
|
|
in {
|
2023-01-15 21:11:03 +00:00
|
|
|
normal =
|
|
|
|
common_keys
|
|
|
|
// {
|
|
|
|
"C-r" = ["extend_to_line_bounds" ":reflow"];
|
|
|
|
};
|
|
|
|
select = {
|
|
|
|
"C-r" = ["extend_to_line_bounds" "join_selections" "keep_primary_selection" "extend_to_line_bounds" ":reflow"];
|
|
|
|
};
|
2022-12-07 16:20:15 +00:00
|
|
|
insert =
|
|
|
|
common_keys
|
|
|
|
// {
|
|
|
|
up = ["normal_mode" "move_line_up"];
|
|
|
|
down = ["normal_mode" "move_line_down"];
|
|
|
|
left = ["normal_mode" "move_char_left"];
|
|
|
|
right = ["normal_mode" "move_char_right"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
editor = {
|
|
|
|
whitespace.render = {
|
|
|
|
space = "all";
|
|
|
|
tab = "all";
|
|
|
|
};
|
|
|
|
lsp.display-messages = true;
|
|
|
|
indent-guides.render = true;
|
|
|
|
cursorline = true;
|
2023-01-09 01:10:46 +00:00
|
|
|
cursorcolumn = true;
|
2022-12-30 19:07:40 +00:00
|
|
|
cursor-shape = {
|
|
|
|
insert = "bar";
|
|
|
|
normal = "underline";
|
|
|
|
};
|
2022-12-07 16:20:15 +00:00
|
|
|
color-modes = true;
|
2022-12-07 23:00:18 +00:00
|
|
|
bufferline = "multiple";
|
|
|
|
auto-save = true;
|
2022-12-07 16:20:15 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
languages = [
|
|
|
|
{
|
|
|
|
name = "haskell";
|
|
|
|
config.languageServerHaskell.formattingProvider = "fourmolu";
|
|
|
|
}
|
2022-12-30 23:06:55 +00:00
|
|
|
{
|
|
|
|
name = "comment";
|
|
|
|
language-server.command = "ltex-ls";
|
|
|
|
config.ltex.additionalRules = {
|
|
|
|
enablePickyRules = true;
|
|
|
|
motherTongue = "de-DE";
|
|
|
|
completionEnabled = true;
|
|
|
|
};
|
|
|
|
}
|
2022-12-30 20:41:45 +00:00
|
|
|
{
|
|
|
|
name = "markdown";
|
|
|
|
language-server.command = "ltex-ls";
|
2022-12-30 23:06:55 +00:00
|
|
|
file-types = ["md" "markdown" "txt"];
|
2022-12-30 20:41:45 +00:00
|
|
|
config.ltex.additionalRules = {
|
|
|
|
enablePickyRules = true;
|
|
|
|
motherTongue = "de-DE";
|
|
|
|
completionEnabled = true;
|
|
|
|
};
|
|
|
|
}
|
2022-12-07 16:20:15 +00:00
|
|
|
{
|
|
|
|
name = "nix";
|
|
|
|
formatter = {
|
|
|
|
command = "alejandra";
|
|
|
|
args = ["-q"];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|