home: Neovim improvements

- Move Neovim to separate module
- Install a few langauge servers
This commit is contained in:
NullBite 2024-12-24 21:06:11 -05:00
parent ef290477fc
commit 67efa28a24
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
3 changed files with 23 additions and 7 deletions

View File

@ -15,6 +15,7 @@ in
config = lib.mkIf cfg.enable {
nixfiles.programs.comma.enable = true;
nixfiles.programs.neovim.enable = lib.mkDefault true;
nixfiles.common.nix.enable = true;
home.sessionVariables = lib.mkMerge [
@ -112,13 +113,6 @@ in
# some packages defined here may be redundant with packages on a non-NixOS
# home-manager setup, but it's better to have a consistent environment at
# the cost of slightly more space
programs.neovim = {
enable = lib.mkDefault true;
vimAlias = lib.mkDefault true;
withPython3 = lib.mkDefault true;
defaultEditor = lib.mkDefault true;
};
home.packages = with pkgs; let
neofetch-hyfetch-shim = writeShellScriptBin "neofetch" ''
exec "${pkgs.hyfetch}/bin/neowofetch" "$@"

View File

@ -5,5 +5,6 @@
./mopidy.nix
./hypridle.nix
./dunst.nix
./neovim.nix
];
}

21
home/programs/neovim.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
let
cfg = config.nixfiles.programs.neovim;
in
{
options.nixfiles.programs.neovim.enable = lib.mkEnableOption "the Neovim configuration";
config = lib.mkIf cfg.enable {
programs.neovim = {
enable = true;
vimAlias = lib.mkDefault true;
withPython3 = lib.mkDefault true;
defaultEditor = lib.mkDefault true;
extraPackages = with pkgs; [
lua-language-server
rust-analyzer
vscode-langservers-extracted
pyright
];
};
};
}