{ 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 ]; extraLuaConfig = '' require "lazy_setup" ''; extraPackages = with pkgs; [ gnumake clang gcc zig cargo rust-analyzer rustup ]; }; home.file.".config/nvim/lua".source = ./nvim-lua; }; }