nixos/modules/home/shell/neovim.nix

39 lines
675 B
Nix
Raw Normal View History

{
lib,
config,
pkgs,
...
}: let
cfg = config.myConfig.shell.neovim;
in {
options.myConfig.shell.neovim = {
enable = lib.mkEnableOption "neovim";
};
config = lib.mkIf cfg.enable {
programs.neovim = {
enable = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins; [
lazy-nvim
nvim-treesitter-parsers.rust
];
extraLuaConfig = ''
require "lazy_setup"
'';
extraPackages = with pkgs; [
gnumake
clang
gcc
zig
cargo
rust-analyzer
rustup
nodejs
];
};
home.file.".config/nvim/lua".source = ./nvim-lua;
};
}