{ config , lib , pkgs , inputs , ... }: with lib; let cfg = config.my.programs.vim; in { options.my.programs.vim = { enable = mkOption { default = true; type = types.bool; example = false; }; }; config = mkIf cfg.enable { home-manager.users.moritz = { home.packages = with pkgs; [ ( if config.my.programs.hyprland.enable then neovide-hyprland else neovide ) ]; programs.neovim = { enable = true; package = pkgs.neovim-nightly; vimAlias = true; vimdiffAlias = true; withNodeJs = true; withPython3 = true; extraLuaConfig = builtins.readFile ./init.lua; extraPackages = with pkgs; [ alejandra black isort jq nil nixpkgs-fmt rustfmt shfmt stylua sumneko-lua-language-server taplo yamlfmt ]; plugins = with pkgs.vimPlugins; [ catppuccin-nvim cmp-nvim-lsp cmp_luasnip comment-nvim copilot-cmp copilot-lua dashboard-nvim direnv-vim formatter-nvim gitsigns-nvim lsp_lines-nvim lspkind-nvim lspsaga-nvim-original lualine-lsp-progress lualine-nvim luasnip neogit noice-nvim nui-nvim # for noice-nvim nvim-autopairs nvim-cmp nvim-lastplace nvim-lspconfig nvim-surround nvim-tree-lua nvim-treesitter-textsubjects nvim-treesitter.withAllGrammars nvim-ts-context-commentstring nvim-web-devicons # for dashboard-nvim orgmode plenary-nvim # for telescope, neogit popup-nvim smartcolumn-nvim telescope-fzf-native-nvim telescope-nvim telescope-zoxide vim-lion which-key-nvim ]; }; }; }; }