Install language servers and configure formatters
This commit is contained in:
parent
62d8e636eb
commit
bfaeca8087
|
@ -21,6 +21,25 @@
|
||||||
explorer.icon.enableNerdfont = true;
|
explorer.icon.enableNerdfont = true;
|
||||||
explorer.file.child.template = "[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][diagnosticWarning & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]";
|
explorer.file.child.template = "[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][diagnosticWarning & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]";
|
||||||
};
|
};
|
||||||
|
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
|
||||||
|
;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [./spelling.nix];
|
imports = [./spelling.nix];
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
|
@ -30,6 +49,8 @@ in {
|
||||||
keys = let
|
keys = let
|
||||||
common_keys = {
|
common_keys = {
|
||||||
"C-s" = ":w";
|
"C-s" = ":w";
|
||||||
|
"C-f" = ":format";
|
||||||
|
"C-r" = ":reflow";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
normal = common_keys;
|
normal = common_keys;
|
||||||
|
@ -53,6 +74,19 @@ in {
|
||||||
color-modes = true;
|
color-modes = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
languages = [
|
||||||
|
{
|
||||||
|
name = "haskell";
|
||||||
|
config.languageServerHaskell.formattingProvider = "fourmolu";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "nix";
|
||||||
|
formatter = {
|
||||||
|
command = "alejandra";
|
||||||
|
args = ["-q"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -151,7 +185,7 @@ in {
|
||||||
};
|
};
|
||||||
xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON cocSettings;
|
xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON cocSettings;
|
||||||
home = {
|
home = {
|
||||||
packages = [pkgs.languagetool];
|
packages = [pkgs.languagetool] ++ builtins.attrValues language-servers;
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
|
|
|
@ -10,7 +10,7 @@ in {
|
||||||
inherit unstable;
|
inherit unstable;
|
||||||
unstableHaskellPackages = unstable.haskellPackages;
|
unstableHaskellPackages = unstable.haskellPackages;
|
||||||
unstableGhc = unstable.ghc;
|
unstableGhc = unstable.ghc;
|
||||||
inherit (unstable) nix home-assistant vscode-extensions vscodium cachix cabal2nix chrysalis;
|
inherit (unstable) nix home-assistant vscode-extensions vscodium cachix cabal2nix chrysalis nil taplo;
|
||||||
nix-output-monitor = nom.packages.x86_64-linux.default;
|
nix-output-monitor = nom.packages.x86_64-linux.default;
|
||||||
helix = hx.packages.x86_64-linux.default;
|
helix = hx.packages.x86_64-linux.default;
|
||||||
nixpkgs-bot = bot.packages.x86_64-linux.default;
|
nixpkgs-bot = bot.packages.x86_64-linux.default;
|
||||||
|
|
Loading…
Reference in a new issue