Cleaner kakoune configuration

This commit is contained in:
Filippo Berto 2023-01-06 10:02:12 +01:00
parent a39ad62ae5
commit 3e95ab122d
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
9 changed files with 61 additions and 23 deletions

View file

@ -1 +1,11 @@
{ pkgs, config, lib, ... }: { home.packages = with pkgs; lib.optionals config.programs.helix.enable [ clang-tools cmake-language-server ]; }
{ pkgs, config, lib, ... }: {
home.packages = with pkgs; [
] ++ lib.optionals config.programs.helix.enable [
clang-tools # C, CPP
cmake-language-server # CMAKE
] ++ lib.optionals config.programs.kakoune.enable [
clang-tools # C, CPP
cmake-language-server # CMAKE
];
}

View file

@ -3,5 +3,8 @@
nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS
yaml-language-server # YAML
taplo-cli # TOML
] ++ lib.optionals config.programs.kakoune.enable [
nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS
yaml-language-server # YAML
];
}

View file

@ -1,8 +1,12 @@
{ pkgs, ... }: {
{ pkgs, lib, config, ... }: {
programs.go = {
enable = true;
goPath = ".go";
};
home.packages = with pkgs; [ gopls ];
home.packages = with pkgs; lib.optionals config.programs.helix.enable [
gopls
] ++ (lib.optionals config.programs.kakoune.enable [
gopls
]);
}

View file

@ -1,2 +1,10 @@
{ pkgs, lib, config, ... }: { home.packages = with pkgs; lib.optionals config.programs.helix.enable [ nodePackages.typescript-language-server ]; }
{ pkgs, lib, config, ... }: {
home.packages = with pkgs; [
] ++ lib.optionals config.programs.helix.enable [
nodePackages.typescript-language-server
] ++ lib.optionals config.programs.kakoune.enable [
nodePackages.typescript-language-server
];
}

View file

@ -5,5 +5,12 @@
texlive.combined.scheme-medium
] ++ lib.optionals config.programs.helix.enable [
texlab
] ++ lib.optionals config.programs.kakoune.enable [
texlab
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
aspellDicts.it
];
}

View file

@ -6,5 +6,7 @@
nix-tree
] ++ lib.optionals config.programs.helix.enable [
nil
] ++ lib.optionals config.programs.kakoune.enable [
rnix-lsp
];
}

View file

@ -1,9 +1,17 @@
{ pkgs, ... }: {
home.packages = with pkgs;
[ black ] ++ (with pkgs.python3Packages; [
python-lsp-server
# pyls-black # not updated to the new pylsp
pyls-flake8
pyls-isort
]);
{ pkgs, lib, config, ... }: {
home.packages = with pkgs; [
black
] ++ lib.optionals config.programs.helix.enable [
python3Packages.python-lsp-server # PYLSP
# python3Packages.pyls-mypy # MYPY # NOT UPDATED
python3Packages.pyls-flake8 # FLAKE8
# python3Packages.pyls-black # BLACK # NOT UPDATED
python3Packages.pyls-isort # ISORT
] ++ lib.optionals config.programs.kakoune.enable [
python3Packages.python-lsp-server # PYLSP
# python3Packages.pyls-mypy # MYPY # NOT UPDATED
python3Packages.pyls-flake8 # FLAKE8
# python3Packages.pyls-black # BLACK # NOT UPDATED
python3Packages.pyls-isort # ISORT
];
}

View file

@ -28,5 +28,10 @@
cargo-workspaces
clippy
rustfmt
] ++ (lib.optionals config.programs.helix.enable [ rust-analyzer ]);
] ++ lib.optionals config.programs.helix.enable [
rust-analyzer
] ++
lib.optionals config.programs.kakoune.enable [
rust-analyzer
];
}

View file

@ -32,15 +32,6 @@ let
packages = with pkgs; [
editorconfig-core-c
nodePackages.vscode-langservers-extracted
rnix-lsp
yaml-language-server
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
aspellDicts.it
(pkgs.makeDesktopItem {
name = "Kakoune";
@ -205,7 +196,7 @@ in
# { mode = "normal"; docstring = "Search"; key = "/"; effect = "/(?i)"; }
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
];
hooks = with pkgs; [
hooks = [
{
name = "BufCreate";
option = ".*";