feat: enable languages tag for neovim

This commit is contained in:
Noa Aarts 2024-09-15 09:09:18 +02:00
parent a065e6dfc4
commit 12c8754584
Signed by: noa
GPG key ID: 1850932741EFF672
4 changed files with 55 additions and 30 deletions

View file

@ -1,36 +1,58 @@
{ pkgs, lib, ... }:
{
programs.neovim =
{
enable = true;
extraPackages = with pkgs; [
ripgrep
luarocks
gnumake
wget
nixpkgs-fmt
tree-sitter
options.modules.apps.neovim = {
enablelanguages = lib.mkEnableOption "enable LSP languages";
};
fd
imports = [
./cpu.nix
./vpn.nix
./tray.nix
./clock.nix
./power.nix
./memory.nix
./window.nix
./network.nix
./workspaces.nix
./temperature.nix
./wireplumber.nix
./spotify.nix
../../common/colors.nix
];
cargo
gcc
go
jdk22
lua51Packages.lua
nodejs
php83Packages.composer
php83
opam
(python3.withPackages (python-pkgs: [
python-pkgs.pip
python-pkgs.black
]))
];
defaultEditor = true;
viAlias = true;
vimAlias = true;
config = {
programs.neovim =
{
enable = true;
extraPackages = with pkgs; [
ripgrep
luarocks
gnumake
wget
nixpkgs-fmt
tree-sitter
fd
extraLuaConfig = lib.fileContents ./init.lua;
};
(lib.mkIf config.modules.neovim.enableLanguages cargo)
(lib.mkIf config.modules.neovim.enableLanguages gcc)
(lib.mkIf config.modules.neovim.enableLanguages go)
(lib.mkIf config.modules.neovim.enableLanguages jdk22)
(lib.mkIf config.modules.neovim.enableLanguages lua51Packages.lua)
(lib.mkIf config.modules.neovim.enableLanguages nodejs)
(lib.mkIf config.modules.neovim.enableLanguages php83Packages.composer)
(lib.mkIf config.modules.neovim.enableLanguages php83)
(lib.mkIf config.modules.neovim.enableLanguages opam)
(lib.mkIf config.modules.neovim.enableLanguages
(python3.withPackages (python-pkgs: [
python-pkgs.pip
python-pkgs.black
])))
];
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraLuaConfig = lib.fileContents ./init.lua;
};
};
}

View file

@ -61,6 +61,7 @@
thunderbird = {
enable = true;
};
neovim.enablelanguages = true;
};
};

View file

@ -52,6 +52,7 @@
thunderbird = {
enable = true;
};
neovim.enablelanguages = true;
};
};

View file

@ -50,6 +50,7 @@
email = "noa@voorwaarts.nl";
};
apps.zsh.enable = true;
apps.neovim.enablelanguages = true;
};
services.syncthing = {