├── .editorconfig ├── .envrc ├── .github ├── CODEOWNERS ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── feature_request.yaml ├── PULL_REQUEST_TEMPLATE │ └── pull_request_template.md ├── README.md ├── assets │ ├── LICENSE │ └── nvf-logo-work.svg ├── dependabot.yml ├── labels.yml ├── typos.toml └── workflows │ ├── backport.yml │ ├── cachix.yml │ ├── check.yml │ ├── cleanup.yml │ ├── docs-preview.yml │ ├── labeler.yml │ └── manual.yml ├── .gitignore ├── LICENSE ├── configuration.nix ├── docs ├── default.nix ├── html-open-tool.nix ├── man │ ├── footer.5 │ ├── header.5 │ └── nvf.1 ├── manual.nix ├── manual │ ├── configuring.md │ ├── configuring │ │ ├── autocmds.md │ │ ├── custom-package.md │ │ ├── custom-plugins.md │ │ ├── custom-plugins │ │ │ ├── configuring.md │ │ │ ├── lazy-method.md │ │ │ ├── legacy-method.md │ │ │ └── non-lazy-method.md │ │ ├── dag-entries.md │ │ ├── dags.md │ │ ├── languages.md │ │ ├── languages │ │ │ └── lsp.md │ │ └── overriding-plugins.md │ ├── hacking.md │ ├── hacking │ │ ├── additional-plugins.md │ │ ├── getting-started.md │ │ ├── guidelines.md │ │ ├── keybinds.md │ │ └── testing.md │ ├── installation.md │ ├── installation │ │ ├── custom-configuration.md │ │ ├── modules.md │ │ ├── modules │ │ │ ├── home-manager.md │ │ │ └── nixos.md │ │ └── standalone │ │ │ ├── home-manager.md │ │ │ └── nixos.md │ ├── manual.md │ ├── options.md │ ├── preface.md │ ├── quirks.md │ ├── quirks │ │ └── nodejs.md │ ├── tips.md │ ├── tips │ │ ├── debugging-nvf.md │ │ ├── offline-docs.md │ │ ├── plugin-sources.md │ │ └── pure-lua-config.md │ └── try-it-out.md ├── release-notes │ ├── release-notes.md │ ├── rl-0.1.md │ ├── rl-0.2.md │ ├── rl-0.3.md │ ├── rl-0.4.md │ ├── rl-0.5.md │ ├── rl-0.6.md │ ├── rl-0.7.md │ └── rl-0.8.md └── static │ ├── script │ ├── anchor-min.js │ ├── anchor-use.js │ └── search.js │ ├── style.css │ ├── style.scss │ ├── tomorrow-night.min.css │ └── tomorrow.min.css ├── flake.lock ├── flake.nix ├── flake ├── apps.nix ├── blink │ └── default.nix ├── develop.nix ├── modules │ ├── home-manager.nix │ └── nixos.nix ├── packages.nix └── templates │ ├── default.nix │ └── standalone │ └── flake.nix ├── lib ├── attrsets.nix ├── binds.nix ├── config.nix ├── dag.nix ├── default.nix ├── languages.nix ├── lists.nix ├── lua.nix ├── stdlib-extended.nix └── types │ ├── custom.nix │ ├── dag.nix │ ├── default.nix │ ├── languages.nix │ └── plugins.nix ├── modules ├── default.nix ├── extra │ └── deprecations.nix ├── modules.nix ├── neovim │ ├── init │ │ ├── autocmds.nix │ │ ├── basic.nix │ │ ├── clipboard.nix │ │ ├── debug.nix │ │ ├── default.nix │ │ ├── diagnostics.nix │ │ ├── highlight.nix │ │ ├── lsp.nix │ │ └── spellcheck.nix │ └── mappings │ │ ├── config.nix │ │ ├── default.nix │ │ └── options.nix ├── plugins │ ├── assistant │ │ ├── chatgpt │ │ │ ├── chatgpt.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── codecompanion │ │ │ ├── codecompanion-nvim.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── copilot │ │ │ ├── config.nix │ │ │ ├── copilot.nix │ │ │ └── default.nix │ │ └── default.nix │ ├── autopairs │ │ ├── default.nix │ │ └── nvim-autopairs │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-autopairs.nix │ ├── comments │ │ ├── comment-nvim │ │ │ ├── comment-nvim.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ └── default.nix │ ├── completion │ │ ├── blink-cmp │ │ │ ├── blink-cmp.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── config.nix │ │ ├── default.nix │ │ ├── module.nix │ │ └── nvim-cmp │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-cmp.nix │ ├── dashboard │ │ ├── alpha │ │ │ ├── alpha.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── dashboard-nvim │ │ │ ├── config.nix │ │ │ ├── dashboard-nvim.nix │ │ │ └── default.nix │ │ ├── default.nix │ │ └── startify │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── startify.nix │ ├── debugger │ │ ├── default.nix │ │ └── nvim-dap │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-dap.nix │ ├── diagnostics │ │ ├── default.nix │ │ └── nvim-lint │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-lint.nix │ ├── filetree │ │ ├── default.nix │ │ ├── neo-tree │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── neo-tree.nix │ │ └── nvimtree │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvimtree.nix │ ├── formatter │ │ ├── conform-nvim │ │ │ ├── config.nix │ │ │ ├── conform-nvim.nix │ │ │ └── default.nix │ │ └── default.nix │ ├── git │ │ ├── default.nix │ │ ├── git-conflict │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── git-conflict.nix │ │ ├── gitlinker-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── gitlinker-nvim.nix │ │ ├── gitsigns │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── gitsigns.nix │ │ └── vim-fugitive │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── vim-fugitive.nix │ ├── hydra │ │ ├── config.nix │ │ ├── default.nix │ │ └── hydra.nix │ ├── languages │ │ ├── asm.nix │ │ ├── astro.nix │ │ ├── bash.nix │ │ ├── clang.nix │ │ ├── clojure.nix │ │ ├── csharp.nix │ │ ├── css.nix │ │ ├── cue.nix │ │ ├── dart.nix │ │ ├── default.nix │ │ ├── elixir.nix │ │ ├── fsharp.nix │ │ ├── gleam.nix │ │ ├── go.nix │ │ ├── haskell.nix │ │ ├── hcl.nix │ │ ├── helm.nix │ │ ├── html.nix │ │ ├── java.nix │ │ ├── julia.nix │ │ ├── kotlin.nix │ │ ├── lua.nix │ │ ├── markdown.nix │ │ ├── nim.nix │ │ ├── nix.nix │ │ ├── nu.nix │ │ ├── ocaml.nix │ │ ├── odin.nix │ │ ├── php.nix │ │ ├── python.nix │ │ ├── r.nix │ │ ├── ruby.nix │ │ ├── rust.nix │ │ ├── scala.nix │ │ ├── sql.nix │ │ ├── svelte.nix │ │ ├── tailwind.nix │ │ ├── terraform.nix │ │ ├── ts.nix │ │ ├── typst.nix │ │ ├── vala.nix │ │ ├── wgsl.nix │ │ ├── yaml.nix │ │ └── zig.nix │ ├── lsp │ │ ├── config.nix │ │ ├── default.nix │ │ ├── lightbulb │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── lightbulb.nix │ │ ├── lsp-signature │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── lsp-signature.nix │ │ ├── lspconfig │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── lspconfig.nix │ │ ├── lspkind │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── lspkind.nix │ │ ├── lspsaga │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── lspsaga.nix │ │ ├── module.nix │ │ ├── null-ls │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── null-ls.nix │ │ ├── nvim-docs-view │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-docs-view.nix │ │ ├── otter │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── otter.nix │ │ └── trouble │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── trouble.nix │ ├── mini │ │ ├── ai │ │ │ ├── ai.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── align │ │ │ ├── align.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── animate │ │ │ ├── animate.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── basics │ │ │ ├── basics.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── bracketed │ │ │ ├── bracketed.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── bufremove │ │ │ ├── bufremove.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── clue │ │ │ ├── clue.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── colors │ │ │ ├── colors.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── comment │ │ │ ├── comment.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── completion │ │ │ ├── completion.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── cursorword │ │ │ ├── config.nix │ │ │ ├── cursorword.nix │ │ │ └── default.nix │ │ ├── default.nix │ │ ├── diff │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── diff.nix │ │ ├── doc │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── doc.nix │ │ ├── extra │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── extra.nix │ │ ├── files │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── files.nix │ │ ├── fuzzy │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── fuzzy.nix │ │ ├── git │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── git.nix │ │ ├── hipatterns │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── hipatterns.nix │ │ ├── hues │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── hues.nix │ │ ├── icons │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── icons.nix │ │ ├── indentscope │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── indentscope.nix │ │ ├── jump │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── jump.nix │ │ ├── jump2d │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── jump2d.nix │ │ ├── map │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── map.nix │ │ ├── misc │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── misc.nix │ │ ├── move │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── move.nix │ │ ├── notify │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── notify.nix │ │ ├── operators │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── operators.nix │ │ ├── pairs │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── pairs.nix │ │ ├── pick │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── pick.nix │ │ ├── sessions │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── sessions.nix │ │ ├── snippets │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── snippets.nix │ │ ├── splitjoin │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── splitjoin.nix │ │ ├── starter │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── starter.nix │ │ ├── statusline │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── statusline.nix │ │ ├── surround │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── surround.nix │ │ ├── tabline │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── tabline.nix │ │ ├── test │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── test.nix │ │ ├── trailspace │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── trailspace.nix │ │ └── visits │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── visits.nix │ ├── minimap │ │ ├── codewindow │ │ │ ├── codewindow.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── default.nix │ │ └── minimap-vim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── minimap-vim.nix │ ├── notes │ │ ├── default.nix │ │ ├── mind-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── mind-nvim.nix │ │ ├── neorg │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── neorg.nix │ │ ├── obsidian │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── obsidian.nix │ │ ├── orgmode │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── orgmode.nix │ │ └── todo-comments │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── todo-comments.nix │ ├── projects │ │ ├── default.nix │ │ └── project-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── project-nvim.nix │ ├── repl │ │ ├── conjure │ │ │ ├── conjure.nix │ │ │ └── default.nix │ │ └── default.nix │ ├── rich-presence │ │ ├── default.nix │ │ └── neocord │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── neocord.nix │ ├── runner │ │ ├── default.nix │ │ └── run-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── run-nvim.nix │ ├── session │ │ ├── default.nix │ │ └── nvim-session-manager │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-session-manager.nix │ ├── snippets │ │ ├── default.nix │ │ └── luasnip │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── luasnip.nix │ ├── spellcheck │ │ ├── default.nix │ │ └── vim-dirtytalk │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── vim-dirtytalk.nix │ ├── statusline │ │ ├── default.nix │ │ └── lualine │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ ├── lualine.nix │ │ │ └── supported_themes.nix │ ├── tabline │ │ ├── default.nix │ │ └── nvim-bufferline │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-bufferline.nix │ ├── terminal │ │ ├── default.nix │ │ └── toggleterm │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── toggleterm.nix │ ├── theme │ │ ├── config.nix │ │ ├── default.nix │ │ ├── supported-themes.nix │ │ └── theme.nix │ ├── treesitter │ │ ├── config.nix │ │ ├── default.nix │ │ ├── treesitter.nix │ │ ├── ts-context │ │ │ ├── config.nix │ │ │ ├── context.nix │ │ │ └── default.nix │ │ └── ts-textobjects │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── textobjects.nix │ ├── ui │ │ ├── borders │ │ │ ├── borders.nix │ │ │ └── default.nix │ │ ├── breadcrumbs │ │ │ ├── breadcrumbs.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── colorizer │ │ │ ├── colorizer.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── default.nix │ │ ├── fastaction │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── fastaction-nvim.nix │ │ ├── illuminate │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── illuminate.nix │ │ ├── modes │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── modes.nix │ │ ├── noice │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── noice.nix │ │ ├── notifications │ │ │ ├── default.nix │ │ │ └── nvim-notify │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── nvim-notify.nix │ │ ├── nvim-ufo │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nvim-ufo.nix │ │ └── smartcolumn │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── smartcolumn.nix │ ├── utility │ │ ├── binds │ │ │ ├── cheatsheet │ │ │ │ ├── cheatsheet.nix │ │ │ │ ├── config.nix │ │ │ │ └── default.nix │ │ │ ├── default.nix │ │ │ ├── hardtime │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── hardtime.nix │ │ │ └── which-key │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── which-key.nix │ │ ├── ccc │ │ │ ├── ccc.nix │ │ │ ├── config.nix │ │ │ └── default.nix │ │ ├── default.nix │ │ ├── diffview │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── diffview.nix │ │ ├── direnv │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── direnv.nix │ │ ├── fzf-lua │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── fzf-lua.nix │ │ ├── gestures │ │ │ ├── default.nix │ │ │ └── gesture-nvim │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── gesture-nvim.nix │ │ ├── harpoon │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── harpoon.nix │ │ ├── icon-picker │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── icon-picker.nix │ │ ├── images │ │ │ ├── default.nix │ │ │ ├── image-nvim │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── image-nvim.nix │ │ │ └── img-clip │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── img-clip.nix │ │ ├── leetcode-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── leetcode-nvim.nix │ │ ├── mkdir │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── mkdir.nix │ │ ├── motion │ │ │ ├── default.nix │ │ │ ├── flash │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── flash.nix │ │ │ ├── hop │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── hop.nix │ │ │ ├── leap │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── leap.nix │ │ │ └── precognition │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── precognition.nix │ │ ├── multicursors │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── multicursors.nix │ │ ├── new-file-template │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── new-file-template.nix │ │ ├── nix-develop │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── nix-develop.nix │ │ ├── oil-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── oil-nvim.nix │ │ ├── outline │ │ │ ├── aerial-nvim │ │ │ │ ├── aerial-nvim.nix │ │ │ │ ├── config.nix │ │ │ │ └── default.nix │ │ │ └── default.nix │ │ ├── preview │ │ │ ├── default.nix │ │ │ ├── glow │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── glow.nix │ │ │ └── markdown-preview │ │ │ │ ├── config.nix │ │ │ │ ├── default.nix │ │ │ │ └── markdown-preview.nix │ │ ├── sleuth │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── sleuth.nix │ │ ├── snacks-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── snacks-nvim.nix │ │ ├── surround │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── surround.nix │ │ ├── telescope │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── telescope.nix │ │ ├── wakatime │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── vim-wakatime.nix │ │ ├── yanky-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── yanky-nvim.nix │ │ └── yazi-nvim │ │ │ ├── config.nix │ │ │ ├── default.nix │ │ │ └── yazi-nvim.nix │ └── visuals │ │ ├── cellular-automaton │ │ ├── cellular-automaton.nix │ │ ├── config.nix │ │ └── default.nix │ │ ├── cinnamon-nvim │ │ ├── cinnamon-nvim.nix │ │ ├── config.nix │ │ └── default.nix │ │ ├── default.nix │ │ ├── fidget-nvim │ │ ├── config.nix │ │ ├── default.nix │ │ └── fidget.nix │ │ ├── highlight-undo │ │ ├── config.nix │ │ ├── default.nix │ │ └── highlight-undo.nix │ │ ├── indent-blankline │ │ ├── config.nix │ │ ├── default.nix │ │ └── indent-blankline.nix │ │ ├── nvim-cursorline │ │ ├── config.nix │ │ ├── default.nix │ │ └── nvim-cursorline.nix │ │ ├── nvim-scrollbar │ │ ├── config.nix │ │ ├── default.nix │ │ └── scrollbar-nvim.nix │ │ ├── nvim-web-devicons │ │ ├── config.nix │ │ ├── default.nix │ │ └── nvim-web-devicons.nix │ │ ├── rainbow-delimiters │ │ ├── config.nix │ │ ├── default.nix │ │ └── rainbow-delimiters.nix │ │ └── tiny-devicons-auto-colors │ │ ├── config.nix │ │ ├── default.nix │ │ └── tiny-devicons-auto-colors.nix └── wrapper │ ├── build │ ├── config.nix │ ├── default.nix │ ├── options.nix │ └── patches │ │ └── flutter-tools.patch │ ├── environment │ ├── config.nix │ ├── default.nix │ └── options.nix │ ├── lazy │ ├── config.nix │ ├── default.nix │ └── lazy.nix │ ├── rc │ ├── config.nix │ ├── default.nix │ └── options.nix │ └── warnings │ └── default.nix ├── npins ├── sources.json └── sources.nix └── release.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = tab 7 | indent_size = 4 8 | insert_final_newline = true 9 | tab_width = 4 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | indent_style = space 14 | indent_size = 2 15 | trim_trailing_whitespace = false 16 | 17 | [*.{js,json,nix,yml,yaml,toml}] 18 | indent_style = space 19 | indent_size = 2 20 | tab_width = 2 21 | 22 | [*.{diff,patch}] 23 | end_of_line = unset 24 | insert_final_newline = unset 25 | trim_trailing_whitespace = unset 26 | 27 | [*.lock] 28 | indent_size = unset 29 | 30 | [npins/sources.json] 31 | insert_final_newline = unset 32 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Codeowners should be used to distinguish the maintainers of the project 2 | # and not contributors of specific modules to nvf. While adding a new module 3 | # please consider adding yourself to 'meta.maintainers' in the module instead 4 | # of CODEOWNERS here. 5 | * @NotAShelf @horriblename @Soliprem 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: NotAShelf 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 15 8 | reviewers: 9 | - NotAShelf 10 | assignees: 11 | - NotAShelf 12 | -------------------------------------------------------------------------------- /.github/typos.toml: -------------------------------------------------------------------------------- 1 | 2 | files.extend-exclude = ["npins/sources.json"] 3 | default.extend-ignore-words-re = [ 4 | "(?i)(noice)", 5 | "befores", 6 | "annote", 7 | "viw", 8 | "BA", # somehow "BANanaD3V" is valid, but BA is not... 9 | ] 10 | 11 | -------------------------------------------------------------------------------- /.github/workflows/backport.yml: -------------------------------------------------------------------------------- 1 | name: Backport PR on Label 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - labeled 7 | 8 | # Permissions needed for the korthout/backport-action to create branches and PRs 9 | permissions: 10 | contents: write 11 | pull-requests: write 12 | 13 | jobs: 14 | backport: 15 | name: Create Backport PR 16 | runs-on: ubuntu-latest 17 | if: | 18 | github.event.pull_request.merged == true && startsWith(github.event.label.name, 'backport-') 19 | steps: 20 | - uses: actions/checkout@v4 21 | with: 22 | ref: ${{ github.event.pull_request.head.sha }} 23 | token: ${{ steps.app-token.outputs.token }} 24 | 25 | - name: Backport Action 26 | uses: korthout/backport-action@v3 27 | with: 28 | # Regex pattern for labels that should trigger a backport AND extracts the target branch 29 | # from the name (e.g. v0.x or v0.x.y; we use zerover). This action will ONLY proceed if 30 | # the label that triggered the workflow fully matches this pattern. 31 | # Example matching labels: "backport-v0.1", "backport-v0.10.1" 32 | # Example non-matching labels: "backport-foo", "backport-v1.0" 33 | label_pattern: '^backport-(v0\.\d+(\.\d+)?)$' 34 | -------------------------------------------------------------------------------- /.github/workflows/cleanup.yml: -------------------------------------------------------------------------------- 1 | name: Delete Stale Branches 2 | permissions: 3 | contents: write 4 | 5 | on: 6 | workflow_dispatch: 7 | schedule: 8 | - cron: "0 4 1 * *" # 4AM on 1st of every month 9 | - cron: "0 4 15 * *" # 4AM on the 15th of every month 10 | 11 | jobs: 12 | branches: 13 | name: Cleanup old branches 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: "Checkout" 17 | uses: actions/checkout@v4 18 | 19 | - name: "Delete old branches" 20 | uses: beatlabs/delete-old-branches-action@v0.0.11 21 | with: 22 | repo_token: "${{ secrets.GITHUB_TOKEN }}" 23 | date: "1 months ago" 24 | dry_run: false 25 | delete_tags: false 26 | exclude_open_pr_branches: true 27 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Label PR" 2 | 3 | on: 4 | pull_request_target: 5 | types: [edited, opened, synchronize, reopened] 6 | 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | 11 | jobs: 12 | labels: 13 | name: "Label PR" 14 | runs-on: ubuntu-latest 15 | if: "!contains(github.event.pull_request.title, '[skip ci]')" 16 | steps: 17 | - uses: actions/labeler@v5 18 | with: 19 | repo-token: ${{ secrets.GITHUB_TOKEN }} 20 | configuration-path: .github/labels.yml 21 | sync-labels: true 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore nix artifacts 2 | result 3 | result/ 4 | .direnv 5 | 6 | # Ignore files generated by common IDEs 7 | .vscode/* 8 | .idea/* 9 | 10 | # Ignore log files generated by my debuggers 11 | *.log 12 | *.log.* 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-2024 NotAShelf 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/html-open-tool.nix: -------------------------------------------------------------------------------- 1 | { 2 | writeShellScriptBin, 3 | makeDesktopItem, 4 | symlinkJoin, 5 | html, 6 | }: let 7 | helpScript = writeShellScriptBin "nvf-help" '' 8 | set -euo pipefail 9 | 10 | if [[ ! -v BROWSER || -z $BROWSER ]]; then 11 | for candidate in xdg-open open w3m; do 12 | BROWSER="$(type -P $candidate || true)" 13 | if [[ -x $BROWSER ]]; then 14 | break; 15 | fi 16 | done 17 | fi 18 | 19 | if [[ ! -v BROWSER || -z $BROWSER ]]; then 20 | echo "$0: unable to start a web browser; please set \$BROWSER" 21 | exit 1 22 | else 23 | exec "$BROWSER" "${html}/share/doc/nvf/index.xhtml" 24 | fi 25 | ''; 26 | 27 | desktopItem = makeDesktopItem { 28 | name = "nvf-manual"; 29 | desktopName = "nvf Manual"; 30 | genericName = "View nvf documentation in a web browser"; 31 | icon = "nix-snowflake"; 32 | exec = "${helpScript}/bin/nvf-help"; 33 | categories = ["System"]; 34 | }; 35 | in 36 | symlinkJoin { 37 | name = "nvf-help"; 38 | paths = [ 39 | helpScript 40 | desktopItem 41 | ]; 42 | } 43 | -------------------------------------------------------------------------------- /docs/man/footer.5: -------------------------------------------------------------------------------- 1 | .SH "AUTHORS" 2 | .PP 3 | nvf contributors 4 | -------------------------------------------------------------------------------- /docs/man/header.5: -------------------------------------------------------------------------------- 1 | .TH "nvf" "5" "January 1, 1980" "nvf" 2 | .\" disable hyphenation 3 | .nh 4 | .\" disable justification (adjust text to left margin only) 5 | .ad l 6 | .\" enable line breaks after slashes 7 | .cflags 4 / 8 | 9 | .SH "NAME" 10 | nvf \- Configuration specification for the nvf. 11 | 12 | .SH "DESCRIPTION" 13 | The nvf configuration specification provides a declarative structure for configuring Neovim using Nix with few 14 | lines of Nix. This document outlines the available options and their usage to create modular, reusable, and 15 | reproducible configurations using nvf's module system options. For tips, tricks and possible quirks with available 16 | plugins please visit https://notashelf.github.io/nvf/ 17 | -------------------------------------------------------------------------------- /docs/manual/configuring.md: -------------------------------------------------------------------------------- 1 | # Configuring nvf {#ch-configuring} 2 | 3 | [helpful tips section]: #ch-helpful-tips 4 | 5 | nvf allows for _very_ extensive configuration in Neovim through the Nix module 6 | interface. The below chapters describe several of the options exposed in nvf for 7 | your convenience. You might also be interested in the [helpful tips section] for 8 | more advanced or unusual configuration options supported by nvf. 9 | 10 | Note that this section does not cover module _options_. For an overview of all 11 | module options provided by nvf, please visit the [appendix](/options.html) 12 | 13 | ```{=include=} chapters 14 | configuring/custom-package.md 15 | configuring/custom-plugins.md 16 | configuring/overriding-plugins.md 17 | configuring/languages.md 18 | configuring/dags.md 19 | configuring/dag-entries.md 20 | configuring/autocmds.md 21 | ``` 22 | -------------------------------------------------------------------------------- /docs/manual/configuring/custom-package.md: -------------------------------------------------------------------------------- 1 | # Custom Neovim Package {#ch-custom-package} 2 | 3 | As of v0.5, you may now specify the Neovim package that will be wrapped with 4 | your configuration. This is done with the [](#opt-vim.package) option. 5 | 6 | ```nix 7 | {inputs, pkgs, ...}: { 8 | # using the neovim-nightly overlay 9 | vim.package = inputs.neovim-overlay.packages.${pkgs.stdenv.system}.neovim; 10 | } 11 | ``` 12 | 13 | The neovim-nightly-overlay always exposes an unwrapped package. If using a 14 | different source, you are highly recommended to get an "unwrapped" version of 15 | the neovim package, similar to `neovim-unwrapped` in nixpkgs. 16 | 17 | ```nix 18 | { pkgs, ...}: { 19 | # using the neovim-nightly overlay 20 | vim.package = pkgs.neovim-unwrapped; 21 | } 22 | ``` 23 | -------------------------------------------------------------------------------- /docs/manual/configuring/custom-plugins/non-lazy-method.md: -------------------------------------------------------------------------------- 1 | # Non-lazy Method {#sec-non-lazy-method} 2 | 3 | As of version **0.5**, we have a more extensive API for configuring plugins that 4 | should be preferred over the legacy method. This API is available as 5 | [](#opt-vim.extraPlugins). Instead of using DAGs exposed by the library 6 | _directly_, you may use the extra plugin module as follows: 7 | 8 | ```nix 9 | {pkgs, ...}: { 10 | config.vim.extraPlugins = { 11 | aerial = { 12 | package = pkgs.vimPlugins.aerial-nvim; 13 | setup = '' 14 | require('aerial').setup { 15 | -- some lua configuration here 16 | } 17 | ''; 18 | }; 19 | 20 | harpoon = { 21 | package = pkgs.vimPlugins.harpoon; 22 | setup = "require('harpoon').setup {}"; 23 | after = ["aerial"]; 24 | }; 25 | }; 26 | } 27 | ``` 28 | 29 | This provides a level of abstraction over the DAG system for faster iteration. 30 | -------------------------------------------------------------------------------- /docs/manual/configuring/languages/lsp.md: -------------------------------------------------------------------------------- 1 | # LSP Custom Packages/Command {#sec-languages-custom-lsp-packages} 2 | 3 | One of the strengths of **nvf** is convenient aliases to quickly configure LSP 4 | servers through the Nix module system. By default the LSP packages for relevant 5 | language modules will be pulled into the closure. If this is not desirable, you 6 | may provide **a custom LSP package** (e.g., a Bash script that calls a command) 7 | or **a list of strings** to be interpreted as the command to launch the language 8 | server. By using a list of strings, you can use this to skip automatic 9 | installation of a language server, and instead use the one found in your `$PATH` 10 | during runtime, for example: 11 | 12 | ```nix 13 | vim.languages.java = { 14 | lsp = { 15 | enable = true; 16 | 17 | # This expects 'jdt-language-server' to be in your PATH or in 18 | # 'vim.extraPackages.' There are no additional checks performed to see 19 | # if the command provided is valid. 20 | package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"]; 21 | }; 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/manual/configuring/overriding-plugins.md: -------------------------------------------------------------------------------- 1 | # Overriding plugins {#ch-overriding-plugins} 2 | 3 | The [additional plugins section](#sec-additional-plugins) details the addition 4 | of new plugins to nvf under regular circumstances, i.e. while making a pull 5 | request to the project. You may _override_ those plugins in your config 6 | to change source versions, e.g., to use newer versions of plugins 7 | that are not yet updated in **nvf**. 8 | 9 | ```nix 10 | vim.pluginOverrides = { 11 | lazydev-nvim = pkgs.fetchFromGitHub { 12 | owner = "folke"; 13 | repo = "lazydev.nvim"; 14 | rev = ""; 15 | hash = ""; 16 | }; 17 | # It's also possible to use a flake input 18 | lazydev-nvim = inputs.lazydev-nvim; 19 | # Or a local path 20 | lazydev-nvim = ./lazydev; 21 | # Or a npins pin... etc 22 | }; 23 | ``` 24 | 25 | This will override the source for the `neodev.nvim` plugin that is used in nvf 26 | with your own plugin. 27 | 28 | ::: {.warning} 29 | 30 | While updating plugin inputs, make sure that any configuration that has been 31 | deprecated in newer versions is changed in the plugin's `setupOpts`. If you 32 | depend on a new version, requesting a version bump in the issues section is a 33 | more reliable option. 34 | 35 | ::: 36 | -------------------------------------------------------------------------------- /docs/manual/hacking/getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started {#sec-contrib-getting-started} 2 | 3 | You, naturally, would like to start by forking the repository to get started. If 4 | you are new to Git and GitHub, do have a look at GitHub's 5 | [Fork a repo guide](https://help.github.com/articles/fork-a-repo/) for 6 | instructions on how you can do this. Once you have a fork of **nvf**, you should 7 | create a separate branch based on the most recent `main` branch. Give your 8 | branch a reasonably descriptive name (e.g. `feature/debugger` or 9 | `fix/pesky-bug`) and you are ready to work on your changes 10 | 11 | Implement your changes and commit them to the newly created branch and when you 12 | are happy with the result, and positive that it fulfills our 13 | [Contributing Guidelines](#sec-guidelines), push the branch to GitHub and 14 | [create a pull request](https://help.github.com/articles/creating-a-pull-request). 15 | The default pull request template available on the **nvf** repository will guide 16 | you through the rest of the process, and we'll gently nudge you in the correct 17 | direction if there are any mistakes. 18 | -------------------------------------------------------------------------------- /docs/manual/hacking/testing.md: -------------------------------------------------------------------------------- 1 | # Testing Changes {#sec-testing-changes} 2 | 3 | Once you have made your changes, you will need to test them thoroughly. If it is 4 | a module, add your module option to `configuration.nix` (located in the root of 5 | this project) inside `neovimConfiguration`. Enable it, and then run the maximal 6 | configuration with `nix run .#maximal -Lv` to check for build errors. If neovim 7 | opens in the current directory without any error messages (you can check the 8 | output of `:messages` inside neovim to see if there are any errors), then your 9 | changes are good to go. Open your pull request, and it will be reviewed as soon 10 | as possible. 11 | 12 | If it is not a new module, but a change to an existing one, then make sure the 13 | module you have changed is enabled in the maximal configuration by editing 14 | `configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same 15 | procedure as adding a new module will apply here. 16 | -------------------------------------------------------------------------------- /docs/manual/installation.md: -------------------------------------------------------------------------------- 1 | # Installing nvf {#ch-installation} 2 | 3 | [module installation section]: #ch-module-installation 4 | 5 | There are multiple ways of installing nvf on your system. You may either choose 6 | the standalone installation method, which does not depend on a module system and 7 | may be done on any system that has the Nix package manager or the appropriate 8 | modules for NixOS and home-manager as described in the 9 | [module installation section]. 10 | 11 | ```{=include=} chapters 12 | installation/custom-configuration.md 13 | installation/modules.md 14 | ``` 15 | -------------------------------------------------------------------------------- /docs/manual/installation/modules.md: -------------------------------------------------------------------------------- 1 | # Module Installation {#ch-module-installation} 2 | 3 | The below chapters will describe installing nvf as NixOS and Home-Manager 4 | modules. Note that those methods are mutually exclusive, and will likely cause 5 | path collisions if used simultaneously. 6 | 7 | ```{=include=} chapters 8 | modules/nixos.md 9 | modules/home-manager.md 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/manual/manual.md: -------------------------------------------------------------------------------- 1 | # nvf manual {#nvf-manual} 2 | 3 | ## Version @NVF_VERSION@ 4 | 5 | ```{=include=} preface 6 | preface.md 7 | try-it-out.md 8 | ``` 9 | 10 | ```{=include=} parts 11 | installation.md 12 | configuring.md 13 | tips.md 14 | ``` 15 | 16 | ```{=include=} chapters 17 | hacking.md 18 | ``` 19 | 20 | ```{=include=} appendix html:into-file=//quirks.html 21 | quirks.md 22 | ``` 23 | 24 | ```{=include=} appendix html:into-file=//options.html 25 | options.md 26 | ``` 27 | 28 | ```{=include=} appendix html:into-file=//release-notes.html 29 | release-notes/release-notes.md 30 | ``` 31 | -------------------------------------------------------------------------------- /docs/manual/options.md: -------------------------------------------------------------------------------- 1 | # nvf Configuration Options {#ch-options} 2 | 3 | Below are the module options provided by nvf, in no particular order. Most 4 | options will include useful comments, warnings or setup tips on how a module 5 | option is meant to be used as well as examples in complex cases. 6 | 7 | An offline version of this page is bundled with nvf as a part of the manpages 8 | which you can access with `man 5 nvf`. Please let us know if you believe any of 9 | the options below are missing useful examples. 10 | 11 | 16 | 17 | ```{=include=} options 18 | id-prefix: opt- 19 | list-id: nvf-options 20 | source: @OPTIONS_JSON@ 21 | ``` 22 | -------------------------------------------------------------------------------- /docs/manual/preface.md: -------------------------------------------------------------------------------- 1 | # Preface {#ch-preface} 2 | 3 | ## What is nvf {#sec-what-is-it} 4 | 5 | nvf is a highly modular, configurable, extensible and easy to use Neovim 6 | configuration in Nix. Designed for flexibility and ease of use, nvf allows you 7 | to easily configure your fully featured Neovim instance with a few lines of Nix. 8 | 9 | ## Bugs & Suggestions {#sec-bugs-suggestions} 10 | 11 | [issue tracker]: https://github.com/notashelf/nvf/issues 12 | [discussions tab]: https://github.com/notashelf/nvf/discussions 13 | [pull requests tab]: https://github.com/notashelf/nvf/pulls 14 | 15 | If you notice any issues with nvf, or this documentation, then please consider 16 | reporting them over at the [issue tracker]. Issues tab, in addition to the 17 | [discussions tab] is a good place as any to request new features. 18 | 19 | You may also consider submitting bugfixes, feature additions and upstreamed 20 | changes that you think are critical over at the [pull requests tab]. 21 | -------------------------------------------------------------------------------- /docs/manual/quirks.md: -------------------------------------------------------------------------------- 1 | # Known Issues and Quirks {#ch-known-issues-quirks} 2 | 3 | At times, certain plugins and modules may refuse to play nicely with your setup, 4 | be it a result of generating Lua from Nix, or the state of packaging. This page, 5 | in turn, will list any known modules or plugins that are known to misbehave, and 6 | possible workarounds that you may apply. 7 | 8 | 10 | 11 | ```{=include=} chapters 12 | quirks/nodejs.md 13 | ``` 14 | -------------------------------------------------------------------------------- /docs/manual/quirks/nodejs.md: -------------------------------------------------------------------------------- 1 | # NodeJS {#ch-quirks-nodejs} 2 | 3 | ## eslint-plugin-prettier {#sec-eslint-plugin-prettier} 4 | 5 | When working with NodeJS, everything works as expected, but some projects have 6 | settings that can fool nvf. 7 | 8 | If [this plugin](https://github.com/prettier/eslint-plugin-prettier) or similar 9 | is included, you might get a situation where your eslint configuration diagnoses 10 | your formatting according to its own config (usually `.eslintrc.js`). 11 | 12 | The issue there is your formatting is made via prettierd. 13 | 14 | This results in auto-formatting relying on your prettier config, while your 15 | eslint config diagnoses formatting 16 | [which it's not supposed to](https://prettier.io/docs/en/comparison.html)) 17 | 18 | In the end, you get discrepancies between what your editor does and what it 19 | wants. 20 | 21 | Solutions are: 22 | 23 | 1. Don't add a formatting config to eslint, and separate prettier and eslint. 24 | 2. PR this repo to add an ESLint formatter and configure nvf to use it. 25 | -------------------------------------------------------------------------------- /docs/manual/tips.md: -------------------------------------------------------------------------------- 1 | # Helpful Tips {#ch-helpful-tips} 2 | 3 | This section provides helpful tips that may be considered "unorthodox" or "too 4 | advanced" for some users. We will cover basic debugging steps, offline 5 | documentation, configuring **nvf** with pure Lua and using custom plugin sources 6 | in **nvf** in this section. For general configuration tips, please see previous 7 | chapters. 8 | 9 | ```{=include=} chapters 10 | tips/debugging-nvf.md 11 | tips/offline-docs.md 12 | tips/pure-lua-config.md 13 | tips/plugin-sources.md 14 | ``` 15 | -------------------------------------------------------------------------------- /docs/manual/tips/debugging-nvf.md: -------------------------------------------------------------------------------- 1 | # Debugging nvf {#sec-debugging-nvf} 2 | 3 | There may be instances where the your Nix configuration evaluates to invalid 4 | Lua, or times when you will be asked to provide your built Lua configuration for 5 | easier debugging by nvf maintainers. nvf provides two helpful utilities out of 6 | the box. 7 | 8 | **nvf-print-config** and **nvf-print-config-path** will be bundled with nvf as 9 | lightweight utilities to help you view or share your built configuration when 10 | necessary. 11 | 12 | To view your configuration with syntax highlighting, you may use the 13 | [bat pager](https://github.com/sharkdp/bat). 14 | 15 | ```bash 16 | nvf-print-config | bat --language=lua 17 | ``` 18 | 19 | Alternatively, `cat` or `less` may also be used. 20 | 21 | ## Accessing `neovimConfig` {#sec-accessing-config} 22 | 23 | It is also possible to access the configuration for the wrapped package. The 24 | _built_ Neovim package will contain a `neovimConfig` attribute in its 25 | `passthru`. 26 | -------------------------------------------------------------------------------- /docs/manual/tips/offline-docs.md: -------------------------------------------------------------------------------- 1 | # Offline Documentation {#sec-offline-documentation} 2 | 3 | [https://notashelf.github.io/nvf/options.html]: https://notashelf.github.io/nvf/options.html 4 | 5 | The manpages provided by nvf contains an offline version of the option search 6 | normally available at [https://notashelf.github.io/nvf/options.html]. You may 7 | use the `man 5 nvf` command to view option documentation from the comfort of 8 | your terminal. 9 | 10 | Note that this is only available for NixOS and Home-Manager module 11 | installations. 12 | -------------------------------------------------------------------------------- /docs/release-notes/release-notes.md: -------------------------------------------------------------------------------- 1 | # Release Notes {#ch-release-notes} 2 | 3 | This section lists the release notes for tagged version of **nvf** and the 4 | current main current main branch 5 | 6 | ```{=include=} chapters 7 | rl-0.1.md 8 | rl-0.2.md 9 | rl-0.3.md 10 | rl-0.4.md 11 | rl-0.5.md 12 | rl-0.6.md 13 | rl-0.7.md 14 | ``` 15 | -------------------------------------------------------------------------------- /docs/static/script/anchor-use.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function(event) { 2 | anchors.add('h1[id]:not(div.note h1, div.warning h1, div.tip h1, div.caution h1, div.important h1), h2[id]:not(div.note h2, div.warning h2, div.tip h2, div.caution h2, div.important h2), h3[id]:not(div.note h3, div.warning h3, div.tip h3, div.caution h3, div.important h3), h4[id]:not(div.note h4, div.warning h4, div.tip h4, div.caution h4, div.important h4), h5[id]:not(div.note h5, div.warning h5, div.tip h5, div.caution h5, div.important h5), h6[id]:not(div.note h6, div.warning h6, div.tip h6, div.caution h6, div.important h6)'); 3 | }); 4 | 5 | -------------------------------------------------------------------------------- /flake/apps.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.meta) getExe; 3 | in { 4 | perSystem = {config, ...}: { 5 | apps = { 6 | nix.program = getExe config.packages.nix; 7 | maximal.program = getExe config.packages.maximal; 8 | default = config.apps.nix; 9 | }; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /flake/blink/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | rustPlatform, 3 | fetchFromGitHub, 4 | writeShellScriptBin, 5 | }: 6 | rustPlatform.buildRustPackage (finalAttrs: { 7 | pname = "blink-cmp"; 8 | version = "1.2.0"; 9 | 10 | src = fetchFromGitHub { 11 | owner = "Saghen"; 12 | repo = "blink.cmp"; 13 | tag = "v${finalAttrs.version}"; 14 | hash = "sha256-bKe8SSg1HPWE7b4iRQJwiOVCrvvgttuHCOIa4U/38AY="; 15 | }; 16 | 17 | forceShare = [ 18 | "man" 19 | "info" 20 | ]; 21 | 22 | postInstall = '' 23 | cp -r {lua,plugin} "$out" 24 | mkdir -p "$out/doc" 25 | cp 'doc/'*'.txt' "$out/doc/" 26 | mkdir -p "$out/target" 27 | mv "$out/lib" "$out/target/release" 28 | ''; 29 | 30 | cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M="; 31 | useFetchCargoVendor = true; 32 | 33 | nativeBuildInputs = [ 34 | (writeShellScriptBin "git" "exit 1") 35 | ]; 36 | 37 | env.RUSTC_BOOTSTRAP = true; 38 | }) 39 | -------------------------------------------------------------------------------- /flake/develop.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: { 2 | perSystem = { 3 | pkgs, 4 | config, 5 | self', 6 | inputs', 7 | ... 8 | }: { 9 | devShells = { 10 | default = self'.devShells.lsp; 11 | nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];}; 12 | lsp = pkgs.mkShellNoCC { 13 | packages = with pkgs; [inputs'.nil.packages.default statix deadnix alejandra npins]; 14 | }; 15 | }; 16 | 17 | # This package exists to make development easier by providing the place and 18 | # boilerplate to build a test nvf configuration. Feel free to use this for 19 | # testing, but make sure to discard the changes before creating a pull 20 | # request. 21 | packages.dev = let 22 | configuration = {}; 23 | 24 | customNeovim = lib.nvim.neovimConfiguration { 25 | inherit pkgs; 26 | modules = [configuration]; 27 | }; 28 | in 29 | customNeovim.neovim; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /flake/templates/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.templates = { 3 | standalone = { 4 | path = ./standalone; 5 | description = "Standalone flake template for nvf"; 6 | welcomeText = '' 7 | Template flake.nix has been created in flake.nix! 8 | 9 | Note that this is a very basic example to bootstrap nvf for you. Please edit your 10 | configuration as described in the nvf manual before using this template. The 11 | configured packages will be ran with 'nix run .' or 'nix run .#neovimConfigured' 12 | 13 | Happy editing! 14 | ''; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /lib/attrsets.nix: -------------------------------------------------------------------------------- 1 | {lib}: let 2 | inherit (builtins) listToAttrs; 3 | in { 4 | mapListToAttrs = f: list: listToAttrs (map f list); 5 | } 6 | -------------------------------------------------------------------------------- /lib/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | self, 3 | inputs, 4 | lib, 5 | ... 6 | }: { 7 | types = import ./types {inherit lib self;}; 8 | config = import ./config.nix {inherit lib;}; 9 | binds = import ./binds.nix {inherit lib;}; 10 | dag = import ./dag.nix {inherit lib;}; 11 | languages = import ./languages.nix {inherit lib;}; 12 | lists = import ./lists.nix {inherit lib;}; 13 | attrsets = import ./attrsets.nix {inherit lib;}; 14 | lua = import ./lua.nix {inherit lib;}; 15 | neovimConfiguration = import ../modules {inherit self inputs lib;}; 16 | } 17 | -------------------------------------------------------------------------------- /lib/lists.nix: -------------------------------------------------------------------------------- 1 | {lib}: let 2 | inherit (lib.lists) elem all; 3 | in { 4 | /* 5 | Checks if all values are present in the list. 6 | 7 | Type: 8 | listContainsValues :: { list :: [a], values :: [a] } -> Bool 9 | 10 | Arguments: 11 | list - A list of elements. 12 | values - A list of values to check for presence in the list. 13 | 14 | Returns: 15 | True if all values are present in the list, otherwise False. 16 | 17 | Example: 18 | ```nix 19 | listContainsValues { list = [1 2 3]; values = [2 3]; } 20 | => True 21 | 22 | listContainsValues { list = [1 2 3]; values = [2 4]; } 23 | => False 24 | ``` 25 | */ 26 | listContainsValues = { 27 | list, 28 | values, 29 | }: let 30 | # Check if all values are present in the list 31 | containsValue = value: elem value list; 32 | in 33 | all containsValue values; 34 | } 35 | -------------------------------------------------------------------------------- /lib/stdlib-extended.nix: -------------------------------------------------------------------------------- 1 | # Convenience function that returns the given Nixpkgs standard library 2 | # extended with our functions using `lib.extend`. 3 | { 4 | inputs, 5 | self, 6 | ... 7 | } @ args: 8 | inputs.nixpkgs.lib.extend (self: super: { 9 | # WARNING: New functions should not be added here, but to files 10 | # imported by `./default.nix` under their own categories. If your 11 | # function does not fit to any of the existing categories, create 12 | # a new file and import it in `./default.nix.` 13 | 14 | # Makes our custom functions available under `lib.nvim` where stdlib-extended.nix is imported 15 | # with the appropriate arguments. For end-users, a `lib` output will be accessible from the flake. 16 | # E.g. for an input called `nvf`, `inputs.nvf.lib.nvim` will return the set 17 | # below. 18 | nvim = import ./. { 19 | inherit (args) inputs self; 20 | lib = self; 21 | }; 22 | 23 | # For forward compatibility. 24 | literalExpression = super.literalExpression or super.literalExample; 25 | }) 26 | -------------------------------------------------------------------------------- /lib/types/custom.nix: -------------------------------------------------------------------------------- 1 | {lib}: let 2 | inherit (lib.options) mergeEqualOption; 3 | inherit (lib.strings) isString stringLength match; 4 | inherit (lib.types) listOf mkOptionType; 5 | in { 6 | mergelessListOf = elemType: let 7 | super = listOf elemType; 8 | in 9 | super 10 | // { 11 | name = "mergelessListOf"; 12 | description = "mergeless ${super.description}"; 13 | merge = mergeEqualOption; 14 | }; 15 | 16 | char = mkOptionType { 17 | name = "char"; 18 | description = "character"; 19 | descriptionClass = "noun"; 20 | check = value: stringLength value < 2; 21 | merge = mergeEqualOption; 22 | }; 23 | 24 | hexColor = mkOptionType { 25 | name = "hex-color"; 26 | descriptionClass = "noun"; 27 | description = "RGB color in hex format"; 28 | check = v: isString v && (match "#?[0-9a-fA-F]{6}" v) != null; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /lib/types/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | self, 4 | }: let 5 | typesDag = import ./dag.nix {inherit lib;}; 6 | typesPlugin = import ./plugins.nix {inherit lib self;}; 7 | typesLanguage = import ./languages.nix {inherit lib;}; 8 | customTypes = import ./custom.nix {inherit lib;}; 9 | in { 10 | inherit (typesDag) dagOf; 11 | inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType; 12 | inherit (typesLanguage) diagnostics mkGrammarOption; 13 | inherit (customTypes) char hexColor mergelessListOf; 14 | } 15 | -------------------------------------------------------------------------------- /lib/types/languages.nix: -------------------------------------------------------------------------------- 1 | {lib}: let 2 | inherit (lib.options) mkOption mkPackageOption; 3 | inherit (lib.attrsets) attrNames; 4 | inherit (lib.types) listOf either enum submodule package; 5 | 6 | diagnosticSubmodule = _: { 7 | options = { 8 | type = mkOption { 9 | description = "Type of diagnostic to enable"; 10 | type = attrNames diagnostics; 11 | }; 12 | 13 | package = mkOption { 14 | type = package; 15 | description = "Diagnostics package"; 16 | }; 17 | }; 18 | }; 19 | 20 | diagnostics = { 21 | langDesc, 22 | diagnosticsProviders, 23 | defaultDiagnosticsProvider, 24 | }: 25 | mkOption { 26 | type = listOf (either (enum (attrNames diagnosticsProviders)) (submodule diagnosticSubmodule)); 27 | default = defaultDiagnosticsProvider; 28 | description = "List of ${langDesc} diagnostics to enable"; 29 | }; 30 | 31 | mkGrammarOption = pkgs: grammar: 32 | mkPackageOption pkgs ["${grammar} treesitter"] { 33 | default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar]; 34 | }; 35 | in { 36 | inherit diagnostics diagnosticSubmodule mkGrammarOption; 37 | } 38 | -------------------------------------------------------------------------------- /modules/neovim/init/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./autocmds.nix 4 | ./basic.nix 5 | ./clipboard.nix 6 | ./debug.nix 7 | ./diagnostics.nix 8 | ./highlight.nix 9 | ./lsp.nix 10 | ./spellcheck.nix 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /modules/neovim/mappings/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkMerge; 7 | inherit (lib.trivial) pipe; 8 | inherit (lib.attrsets) mapAttrsToList; 9 | inherit (lib.lists) flatten; 10 | 11 | legacyMapModes = { 12 | normal = ["n"]; 13 | insert = ["i"]; 14 | select = ["s"]; 15 | visual = ["v"]; 16 | terminal = ["t"]; 17 | normalVisualOp = ["n" "v" "o"]; 18 | visualOnly = ["n" "x"]; 19 | operator = ["o"]; 20 | insertCommand = ["i" "c"]; 21 | lang = ["l"]; 22 | command = ["c"]; 23 | }; 24 | 25 | cfg = config.vim; 26 | in { 27 | config = { 28 | vim.keymaps = mkMerge [ 29 | ( 30 | pipe cfg.maps 31 | [ 32 | (mapAttrsToList ( 33 | oldMode: keybinds: 34 | mapAttrsToList ( 35 | key: bind: 36 | bind 37 | // { 38 | inherit key; 39 | mode = legacyMapModes.${oldMode}; 40 | } 41 | ) 42 | keybinds 43 | )) 44 | flatten 45 | ] 46 | ) 47 | ]; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /modules/neovim/mappings/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./options.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/assistant/chatgpt/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./chatgpt.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/assistant/codecompanion/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.assistant.codecompanion-nvim; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | startPlugins = [ 13 | "plenary-nvim" 14 | ]; 15 | 16 | lazy.plugins = { 17 | codecompanion-nvim = { 18 | package = "codecompanion-nvim"; 19 | setupModule = "codecompanion"; 20 | inherit (cfg) setupOpts; 21 | }; 22 | }; 23 | 24 | treesitter = { 25 | enable = true; 26 | 27 | # Codecompanion depends on the YAML grammar being added. Below is 28 | # an easy way of adding an user-configurable grammar package exposed 29 | # by the YAML language module *without* enabling the whole YAML language 30 | # module. The package is defined even when the module is disabled. 31 | grammars = [ 32 | config.vim.languages.yaml.treesitter.package 33 | ]; 34 | }; 35 | 36 | autocomplete.nvim-cmp = { 37 | sources = {codecompanion-nvim = "[codecompanion]";}; 38 | sourcePlugins = ["codecompanion-nvim"]; 39 | }; 40 | }; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /modules/plugins/assistant/codecompanion/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./codecompanion-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/assistant/copilot/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./copilot.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/assistant/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./chatgpt 4 | ./copilot 5 | ./codecompanion 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/autopairs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-autopairs 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/autopairs/nvim-autopairs/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.autopairs.nvim-autopairs; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["nvim-autopairs"]; 15 | pluginRC.autopairs = entryAnywhere '' 16 | require('nvim-autopairs').setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/autopairs/nvim-autopairs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-autopairs.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/autopairs/nvim-autopairs/nvim-autopairs.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib) mkRemovedOptionModule; 3 | inherit (lib.options) mkEnableOption; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | imports = [ 7 | (mkRemovedOptionModule ["vim" "autopairs" "nvim-compe"] "nvim-compe is deprecated and no longer supported.") 8 | ]; 9 | 10 | options.vim.autopairs.nvim-autopairs = { 11 | enable = mkEnableOption "autopairs"; 12 | setupOpts = mkPluginSetupOption "nvim-autopairs" {}; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/plugins/comments/comment-nvim/comment-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.binds) mkMappingOption; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | options.vim.comments.comment-nvim = { 7 | enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim"; 8 | 9 | mappings = { 10 | toggleCurrentLine = mkMappingOption "Toggle current line comment" "gcc"; 11 | toggleCurrentBlock = mkMappingOption "Toggle current block comment" "gbc"; 12 | 13 | toggleOpLeaderLine = mkMappingOption "Toggle line comment" "gc"; 14 | toggleOpLeaderBlock = mkMappingOption "Toggle block comment" "gb"; 15 | 16 | toggleSelectedLine = mkMappingOption "Toggle selected comment" "gc"; 17 | toggleSelectedBlock = mkMappingOption "Toggle selected block" "gb"; 18 | }; 19 | 20 | setupOpts = mkPluginSetupOption "Comment-nvim" { 21 | mappings = { 22 | basic = mkEnableOption "basic mappings"; 23 | extra = mkEnableOption "extra mappings"; 24 | }; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /modules/plugins/comments/comment-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./comment-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/comments/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./comment-nvim 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/completion/blink-cmp/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./blink-cmp.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/completion/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.attrsets) mapListToAttrs; 8 | inherit (builtins) typeOf tryEval; 9 | 10 | cfg = config.vim.autocomplete; 11 | getPluginName = plugin: 12 | if typeOf plugin == "string" 13 | then plugin 14 | else if (plugin ? pname && (tryEval plugin.pname).success) 15 | then plugin.pname 16 | else plugin.name; 17 | in { 18 | config.vim = mkIf cfg.enableSharedCmpSources { 19 | startPlugins = ["rtp-nvim"]; 20 | lazy.plugins = 21 | mapListToAttrs (package: { 22 | name = getPluginName package; 23 | value = { 24 | inherit package; 25 | lazy = true; 26 | after = '' 27 | local path = vim.fn.globpath(vim.o.packpath, 'pack/*/opt/${getPluginName package}') 28 | require("rtp_nvim").source_after_plugin_dir(path) 29 | ''; 30 | }; 31 | }) 32 | cfg.nvim-cmp.sourcePlugins; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /modules/plugins/completion/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./module.nix 4 | ./config.nix 5 | 6 | ./nvim-cmp 7 | ./blink-cmp 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/completion/module.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.autocomplete = { 5 | enableSharedCmpSources = mkEnableOption "sources shared by blink.cmp and nvim-cmp"; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/completion/nvim-cmp/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-cmp.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/alpha/alpha.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption mkOption; 3 | inherit (lib.types) listOf attrsOf anything nullOr enum; 4 | in { 5 | options.vim.dashboard.alpha = { 6 | enable = mkEnableOption "fast and fully programmable greeter for neovim [alpha.nvim]"; 7 | theme = mkOption { 8 | type = nullOr (enum ["dashboard" "startify" "theta"]); 9 | default = "dashboard"; 10 | description = "Alpha default theme to use"; 11 | }; 12 | layout = mkOption { 13 | type = listOf (attrsOf anything); 14 | default = []; 15 | description = "Alpha dashboard layout"; 16 | }; 17 | opts = mkOption { 18 | type = attrsOf anything; 19 | default = {}; 20 | description = "Optional global options"; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/alpha/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.dashboard.alpha; 11 | themeDefined = cfg.theme != null; 12 | layoutDefined = cfg.layout != []; 13 | in { 14 | config = mkIf cfg.enable { 15 | vim.startPlugins = [ 16 | "alpha-nvim" 17 | "nvim-web-devicons" 18 | ]; 19 | 20 | vim.pluginRC.alpha = let 21 | setupOpts = 22 | if themeDefined 23 | then lib.generators.mkLuaInline "require'alpha.themes.${cfg.theme}'.config" 24 | else { 25 | inherit (cfg) layout opts; 26 | }; 27 | in '' 28 | require('alpha').setup(${toLuaObject setupOpts}) 29 | ''; 30 | 31 | assertions = [ 32 | { 33 | assertion = themeDefined || layoutDefined; 34 | message = '' 35 | One of 'theme' or 'layout' should be defined in Alpha configuration. 36 | ''; 37 | } 38 | { 39 | assertion = !(themeDefined && layoutDefined); 40 | message = '' 41 | 'theme' and 'layout' cannot be defined at the same time. 42 | ''; 43 | } 44 | ]; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/alpha/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./alpha.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/dashboard-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.dashboard.dashboard-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["dashboard-nvim"]; 15 | 16 | pluginRC.dashboard-nvim = entryAnywhere '' 17 | require("dashboard").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.dashboard.dashboard-nvim = { 6 | enable = mkEnableOption "Fancy and Blazing Fast start screen plugin of neovim [dashboard.nvim]"; 7 | setupOpts = mkPluginSetupOption "dashboard.nvim" {}; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/dashboard-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./dashboard-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./alpha 4 | ./dashboard-nvim 5 | ./startify 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/dashboard/startify/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./startify.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/debugger/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-dap 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/debugger/nvim-dap/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-dap.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/diagnostics/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [./nvim-lint]; 3 | } 4 | -------------------------------------------------------------------------------- /modules/plugins/diagnostics/nvim-lint/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-lint.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/filetree/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvimtree 4 | ./neo-tree 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/filetree/neo-tree/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./neo-tree.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/filetree/nvimtree/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvimtree.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/formatter/conform-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.formatter.conform-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["conform-nvim"]; 15 | pluginRC.conform-nvim = entryAnywhere '' 16 | require("conform").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/formatter/conform-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./conform-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/formatter/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [./conform-nvim]; 3 | } 4 | -------------------------------------------------------------------------------- /modules/plugins/git/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | imports = [ 5 | ./gitsigns 6 | ./vim-fugitive 7 | ./git-conflict 8 | ./gitlinker-nvim 9 | ]; 10 | 11 | options.vim.git = { 12 | enable = mkEnableOption '' 13 | git integration suite. 14 | 15 | Enabling this option will enable the following plugins: 16 | * gitsigns 17 | * vim-fugitive 18 | * git-conflict 19 | * gitlinker-nvim 20 | ''; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/git/git-conflict/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./git-conflict.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/git/git-conflict/git-conflict.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.binds) mkMappingOption; 8 | inherit (lib.nvim.types) mkPluginSetupOption; 9 | in { 10 | options.vim.git.git-conflict = { 11 | enable = mkEnableOption "git-conflict" // {default = config.vim.git.enable;}; 12 | setupOpts = mkPluginSetupOption "git-conflict" {}; 13 | 14 | mappings = { 15 | ours = mkMappingOption "Choose Ours [Git-Conflict]" "co"; 16 | theirs = mkMappingOption "Choose Theirs [Git-Conflict]" "ct"; 17 | both = mkMappingOption "Choose Both [Git-Conflict]" "cb"; 18 | none = mkMappingOption "Choose None [Git-Conflict]" "c0"; 19 | prevConflict = mkMappingOption "Go to the previous Conflict [Git-Conflict]" "]x"; 20 | nextConflict = mkMappingOption "Go to the next Conflict [Git-Conflict]" "[x"; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/git/gitlinker-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.git.gitlinker-nvim; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | lazy.plugins = { 13 | "gitlinker-nvim" = { 14 | package = "gitlinker-nvim"; 15 | setupModule = "gitlinker"; 16 | inherit (cfg) setupOpts; 17 | cmd = ["GitLink"]; 18 | }; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/git/gitlinker-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./gitlinker-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.git.gitlinker-nvim = { 10 | enable = mkEnableOption "gitlinker-nvim" // {default = config.vim.git.enable;}; 11 | setupOpts = mkPluginSetupOption "gitlinker-nvim" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/git/gitsigns/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./gitsigns.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/git/vim-fugitive/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.git.vim-fugitive; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim.startPlugins = ["vim-fugitive"]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/git/vim-fugitive/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./vim-fugitive.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/git/vim-fugitive/vim-fugitive.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | in { 8 | options.vim.git.vim-fugitive = { 9 | enable = mkEnableOption "vim-fugitive" // {default = config.vim.git.enable;}; 10 | 11 | # TODO: sane default keybinds for vim-fugitive 12 | # mappings = {}; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/plugins/hydra/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | cfg = config.vim.hydra; 8 | in { 9 | config = mkIf cfg.enable { 10 | vim = { 11 | startPlugins = []; 12 | lazy.plugins.hydra = { 13 | package = "hydra.nvim"; 14 | setupModule = "hydra"; 15 | inherit (cfg) setupOpts; 16 | 17 | event = ["DeferredUIEnter"]; 18 | cmd = ["MCstart" "MCvisual" "MCclear" "MCpattern" "MCvisualPattern" "MCunderCursor"]; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/hydra/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./hydra.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/hydra/hydra.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.utility.hydra = { 5 | enable = mkEnableOption "utility for creating custom submodes and menus [nvimtools/hydra.nvim]"; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/lsp/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | # nvim lsp support 4 | ./config.nix 5 | ./module.nix 6 | 7 | ./lspconfig 8 | ./lspsaga 9 | ./null-ls 10 | 11 | # lsp plugins 12 | ./lspsaga 13 | ./trouble 14 | ./lsp-signature 15 | ./lightbulb 16 | ./otter 17 | ./lspkind 18 | ./nvim-docs-view 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lightbulb/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./lightbulb.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lightbulb/lightbulb.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkOption mkEnableOption; 3 | inherit (lib.types) listOf str either; 4 | inherit (lib.nvim.types) mkPluginSetupOption luaInline; 5 | in { 6 | options.vim.lsp = { 7 | lightbulb = { 8 | enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font"; 9 | setupOpts = mkPluginSetupOption "nvim-lightbulb" {}; 10 | autocmd = { 11 | enable = mkEnableOption "updating lightbulb glyph automatically" // {default = true;}; 12 | events = mkOption { 13 | type = listOf str; 14 | default = ["CursorHold" "CursorHoldI"]; 15 | description = "Events on which to update nvim-lightbulb glyphs"; 16 | }; 17 | 18 | pattern = mkOption { 19 | type = either str luaInline; 20 | default = "*"; 21 | description = '' 22 | File patterns or buffer names to match, determining which files or buffers trigger 23 | glyph updates. 24 | ''; 25 | }; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lsp-signature/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.lsp; 11 | in { 12 | config = mkIf (cfg.enable && cfg.lspSignature.enable) { 13 | assertions = [ 14 | { 15 | assertion = !config.vim.autocomplete.blink-cmp.enable; 16 | message = '' 17 | lsp-signature does not work with blink.cmp. Please use blink.cmp's builtin signature feature: 18 | 19 | vim.autocomplete.blink-cmp.setupOpts.signature.enabled = true; 20 | ''; 21 | } 22 | ]; 23 | vim = { 24 | startPlugins = [ 25 | "lsp-signature-nvim" 26 | ]; 27 | 28 | lsp.lspSignature.setupOpts = { 29 | bind = config.vim.ui.borders.plugins.lsp-signature.enable; 30 | handler_opts.border = config.vim.ui.borders.plugins.lsp-signature.style; 31 | }; 32 | 33 | pluginRC.lsp-signature = entryAnywhere '' 34 | -- Enable lsp signature viewer 35 | require("lsp_signature").setup(${toLuaObject cfg.lspSignature.setupOpts}) 36 | ''; 37 | }; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lsp-signature/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./lsp-signature.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lsp-signature/lsp-signature.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.lsp = { 6 | lspSignature = { 7 | enable = mkEnableOption "lsp signature viewer"; 8 | setupOpts = mkPluginSetupOption "lsp-signature" {}; 9 | }; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspconfig/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkMerge; 7 | inherit (lib.strings) optionalString; 8 | inherit (lib.attrsets) mapAttrs; 9 | inherit (lib.nvim.dag) entryAfter; 10 | inherit (lib.nvim.lua) toLuaObject; 11 | 12 | cfg = config.vim.lsp; 13 | in { 14 | config = mkIf cfg.lspconfig.enable (mkMerge [ 15 | { 16 | vim = { 17 | startPlugins = ["nvim-lspconfig"]; 18 | 19 | pluginRC.lspconfig = entryAfter ["lsp-setup"] '' 20 | local lspconfig = require('lspconfig') 21 | 22 | ${ 23 | optionalString config.vim.ui.borders.enable '' 24 | require('lspconfig.ui.windows').default_options.border = ${toLuaObject config.vim.ui.borders.globalStyle} 25 | '' 26 | } 27 | ''; 28 | }; 29 | } 30 | { 31 | vim.pluginRC = mapAttrs (_: v: (entryAfter ["lspconfig"] v)) cfg.lspconfig.sources; 32 | } 33 | ]); 34 | } 35 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspconfig/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./lspconfig.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspconfig/lspconfig.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption mkOption; 3 | inherit (lib.types) attrsOf str; 4 | in { 5 | options.vim.lsp.lspconfig = { 6 | enable = mkEnableOption "nvim-lspconfig, also enabled automatically"; 7 | 8 | sources = mkOption { 9 | description = "nvim-lspconfig sources"; 10 | type = attrsOf str; 11 | default = {}; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspkind/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./lspkind.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspkind/lspkind.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption mkOption; 3 | inherit (lib.types) enum nullOr; 4 | inherit (lib.nvim.types) mkPluginSetupOption luaInline; 5 | in { 6 | options.vim.lsp.lspkind = { 7 | enable = mkEnableOption "vscode-like pictograms for lsp [lspkind]"; 8 | setupOpts = mkPluginSetupOption "lspkind.nvim" { 9 | mode = mkOption { 10 | description = "Defines how annotations are shown"; 11 | type = enum ["text" "text_symbol" "symbol_text" "symbol"]; 12 | default = "symbol_text"; 13 | }; 14 | 15 | before = mkOption { 16 | description = "The function that will be called before lspkind's modifications are applied"; 17 | type = nullOr luaInline; 18 | default = null; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspsaga/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkDefault; 7 | 8 | cfg = config.vim.lsp; 9 | in { 10 | config = mkIf (cfg.enable && cfg.lspsaga.enable) { 11 | vim = { 12 | lazy.plugins.lspsaga-nvim = { 13 | package = "lspsaga-nvim"; 14 | setupModule = "lspsaga"; 15 | inherit (cfg.lspsaga) setupOpts; 16 | 17 | event = ["LspAttach"]; 18 | }; 19 | 20 | # Optional dependencies, pretty useful to enhance default functionality of 21 | # Lspsaga. 22 | treesitter.enable = mkDefault true; 23 | visuals.nvim-web-devicons.enable = mkDefault true; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/plugins/lsp/lspsaga/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./lspsaga.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/null-ls/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkMerge; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAfter; 9 | 10 | cfg = config.vim.lsp.null-ls; 11 | in { 12 | config = mkIf cfg.enable (mkMerge [ 13 | { 14 | vim = { 15 | startPlugins = [ 16 | "none-ls-nvim" 17 | "plenary-nvim" 18 | ]; 19 | 20 | # null-ls implies that LSP is already being set up 21 | # as it will hook into LSPs to receive information. 22 | lsp.enable = true; 23 | 24 | pluginRC.null_ls = entryAfter ["lsp-setup"] '' 25 | require('null-ls').setup(${toLuaObject cfg.setupOpts}) 26 | ''; 27 | }; 28 | } 29 | ]); 30 | } 31 | -------------------------------------------------------------------------------- /modules/plugins/lsp/null-ls/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./null-ls.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/nvim-docs-view/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkMerge; 7 | inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | inherit (lib.nvim.lua) toLuaObject; 10 | 11 | cfg = config.vim.lsp.nvim-docs-view; 12 | self = import ./nvim-docs-view.nix {inherit lib;}; 13 | 14 | mappingDefinitions = self.options.vim.lsp.nvim-docs-view.mappings; 15 | mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; 16 | in { 17 | config = mkIf cfg.enable { 18 | vim = { 19 | lsp.enable = true; 20 | startPlugins = ["nvim-docs-view"]; 21 | 22 | pluginRC.nvim-docs-view = entryAnywhere '' 23 | require("docs-view").setup ${toLuaObject cfg.setupOpts} 24 | ''; 25 | 26 | maps.normal = mkMerge [ 27 | (mkSetBinding mappings.viewToggle "DocsViewToggle") 28 | (mkSetBinding mappings.viewUpdate "DocsViewUpdate") 29 | ]; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/plugins/lsp/nvim-docs-view/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-docs-view.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/otter/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./otter.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/trouble/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./trouble.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/lsp/trouble/trouble.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.binds) mkMappingOption; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | options.vim.lsp = { 7 | trouble = { 8 | enable = mkEnableOption "trouble diagnostics viewer"; 9 | 10 | setupOpts = mkPluginSetupOption "Trouble" {}; 11 | 12 | mappings = { 13 | workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "lwd"; 14 | documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "ld"; 15 | lspReferences = mkMappingOption "LSP References [trouble]" "lr"; 16 | quickfix = mkMappingOption "QuickFix [trouble]" "xq"; 17 | locList = mkMappingOption "LOCList [trouble]" "xl"; 18 | symbols = mkMappingOption "Symbols [trouble]" "xs"; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/mini/ai/ai.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.ai = { 10 | enable = mkEnableOption "mini.ai"; 11 | setupOpts = mkPluginSetupOption "mini.ai" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/ai/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.ai; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-ai"]; 14 | 15 | pluginRC.mini-ai = entryAnywhere '' 16 | require("mini.ai").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/ai/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./ai.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/align/align.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.align = { 10 | enable = mkEnableOption "mini.align"; 11 | setupOpts = mkPluginSetupOption "mini.align" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/align/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.align; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-align"]; 14 | 15 | pluginRC.mini-align = entryAnywhere '' 16 | require("mini.align").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/align/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./align.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/animate/animate.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.animate = { 10 | enable = mkEnableOption "mini.animate"; 11 | setupOpts = mkPluginSetupOption "mini.animate" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/animate/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.animate; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-animate"]; 14 | 15 | pluginRC.mini-animate = entryAnywhere '' 16 | require("mini.animate").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/animate/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./animate.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/basics/basics.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.basics = { 10 | enable = mkEnableOption "mini.basics"; 11 | setupOpts = mkPluginSetupOption "mini.basics" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/basics/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.basics; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-basics"]; 14 | 15 | pluginRC.mini-basics = entryAnywhere '' 16 | require("mini.basics").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/basics/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./basics.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/bracketed/bracketed.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.bracketed = { 10 | enable = mkEnableOption "mini.bracketed"; 11 | setupOpts = mkPluginSetupOption "mini.bracketed" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/bracketed/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.bracketed; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-bracketed"]; 14 | 15 | pluginRC.mini-bracketed = entryAnywhere '' 16 | require("mini.bracketed").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/bracketed/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./bracketed.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/bufremove/bufremove.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.bufremove = { 10 | enable = mkEnableOption "mini.bufremove"; 11 | setupOpts = mkPluginSetupOption "mini.bufremove" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/bufremove/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.bufremove; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-bufremove"]; 14 | 15 | pluginRC.mini-bufremove = entryAnywhere '' 16 | require("mini.bufremove").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/bufremove/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./bufremove.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/clue/clue.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.clue = { 10 | enable = mkEnableOption "mini.clue"; 11 | setupOpts = mkPluginSetupOption "mini.clue" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/clue/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.clue; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-clue"]; 14 | 15 | pluginRC.mini-clue = entryAnywhere '' 16 | require("mini.clue").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/clue/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./clue.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/colors/colors.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | in { 8 | options.vim.mini.colors = { 9 | enable = mkEnableOption "mini.colors"; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /modules/plugins/mini/colors/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | 9 | cfg = config.vim.mini.colors; 10 | in { 11 | vim = mkIf cfg.enable { 12 | startPlugins = ["mini-colors"]; 13 | 14 | pluginRC.mini-colors = entryAnywhere '' 15 | require("mini.colors").setup() 16 | ''; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/plugins/mini/colors/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./colors.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/comment/comment.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.comment = { 10 | enable = mkEnableOption "mini.comment"; 11 | setupOpts = mkPluginSetupOption "mini.comment" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/comment/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.comment; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-comment"]; 14 | 15 | pluginRC.mini-comment = entryAnywhere '' 16 | require("mini.comment").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/comment/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./comment.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/completion/completion.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.completion = { 10 | enable = mkEnableOption "mini.completion"; 11 | setupOpts = mkPluginSetupOption "mini.completion" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/completion/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.completion; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-completion"]; 14 | 15 | pluginRC.mini-completion = entryAnywhere '' 16 | require("mini.completion").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/completion/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./completion.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/cursorword/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.cursorword; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-cursorword"]; 14 | 15 | pluginRC.mini-ai = entryAnywhere '' 16 | require("mini.cursorword").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/cursorword/cursorword.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.mini.cursorword = { 6 | enable = mkEnableOption "mini.cursorword"; 7 | setupOpts = mkPluginSetupOption "mini.cursorword" {}; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/mini/cursorword/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./cursorword.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./ai 4 | ./align 5 | ./animate 6 | # ./base16 # NOTE: configured in theme/ 7 | ./basics 8 | ./bracketed 9 | ./bufremove 10 | ./clue 11 | ./colors 12 | ./comment 13 | ./completion 14 | ./cursorword 15 | ./diff 16 | ./doc 17 | ./extra 18 | ./files 19 | ./fuzzy 20 | ./git 21 | ./hipatterns 22 | ./hues 23 | ./icons 24 | ./indentscope 25 | ./jump 26 | ./jump2d 27 | ./map 28 | ./misc 29 | ./move 30 | ./notify 31 | ./operators 32 | ./pairs 33 | ./pick 34 | ./sessions 35 | ./snippets 36 | ./splitjoin 37 | ./starter 38 | ./statusline 39 | ./surround 40 | ./tabline 41 | ./test 42 | ./trailspace 43 | ./visits 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /modules/plugins/mini/diff/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.diff; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-diff"]; 14 | 15 | pluginRC.mini-diff = entryAnywhere '' 16 | require("mini.diff").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/diff/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./diff.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/diff/diff.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.diff = { 10 | enable = mkEnableOption "mini.diff"; 11 | setupOpts = mkPluginSetupOption "mini.diff" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/doc/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.doc; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-doc"]; 14 | 15 | pluginRC.mini-doc = entryAnywhere '' 16 | require("mini.doc").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/doc/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./doc.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/doc/doc.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.doc = { 10 | enable = mkEnableOption "mini.doc"; 11 | setupOpts = mkPluginSetupOption "mini.doc" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/extra/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | 9 | cfg = config.vim.mini.extra; 10 | in { 11 | vim = mkIf cfg.enable { 12 | startPlugins = ["mini-extra"]; 13 | 14 | pluginRC.mini-extra = entryAnywhere '' 15 | require("mini.extra").setup() 16 | ''; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/plugins/mini/extra/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./extra.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/extra/extra.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | in { 8 | options.vim.mini.extra = { 9 | enable = mkEnableOption "mini.extra"; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /modules/plugins/mini/files/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.files; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-files"]; 14 | 15 | pluginRC.mini-files = entryAnywhere '' 16 | require("mini.files").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/files/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./files.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/files/files.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.files = { 10 | enable = mkEnableOption "mini.files"; 11 | setupOpts = mkPluginSetupOption "mini.files" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/fuzzy/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.fuzzy; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-fuzzy"]; 14 | 15 | pluginRC.mini-fuzzy = entryAnywhere '' 16 | require("mini.fuzzy").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/fuzzy/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./fuzzy.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/fuzzy/fuzzy.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.fuzzy = { 10 | enable = mkEnableOption "mini.fuzzy"; 11 | setupOpts = mkPluginSetupOption "mini.fuzzy" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/git/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.git; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-git"]; 14 | 15 | pluginRC.mini-git = entryAnywhere '' 16 | require("mini.git").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/git/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./git.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/git/git.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.git = { 10 | enable = mkEnableOption "mini.git"; 11 | setupOpts = mkPluginSetupOption "mini.git" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/hipatterns/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.hipatterns; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-hipatterns"]; 14 | 15 | pluginRC.mini-hipatterns = entryAnywhere '' 16 | require("mini.hipatterns").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/hipatterns/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./hipatterns.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/hipatterns/hipatterns.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.hipatterns = { 10 | enable = mkEnableOption "mini.hipatterns"; 11 | setupOpts = mkPluginSetupOption "mini.hipatterns" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/hues/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.hues; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-hues"]; 14 | 15 | pluginRC.mini-hues = entryAnywhere '' 16 | require("mini.hues").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/hues/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./hues.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/hues/hues.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption mkOption; 7 | inherit (lib.strings) hasPrefix; 8 | inherit (lib.nvim.types) mkPluginSetupOption; 9 | inherit (lib.nvim.types) hexColor; 10 | in { 11 | options.vim.mini.hues = { 12 | enable = mkEnableOption "mini.hues"; 13 | setupOpts = mkPluginSetupOption "mini.hues" { 14 | background = mkOption { 15 | description = "The hex color for the background color of the color scheme, prefixed with #"; 16 | type = hexColor; 17 | }; 18 | 19 | foreground = mkOption { 20 | description = "The hex color for the foreground color of the color scheme, prefixed with #"; 21 | type = hexColor; 22 | }; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /modules/plugins/mini/icons/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.icons; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-icons"]; 14 | 15 | pluginRC.mini-icons = entryAnywhere '' 16 | require("mini.icons").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/icons/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./icons.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/icons/icons.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.icons = { 10 | enable = mkEnableOption "mini.icons"; 11 | setupOpts = mkPluginSetupOption "mini.icons" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/indentscope/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.generators) mkLuaInline; 7 | inherit (lib.modules) mkIf; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | inherit (lib.nvim.lua) toLuaObject; 10 | 11 | cfg = config.vim.mini.indentscope; 12 | in { 13 | vim = mkIf cfg.enable { 14 | autocmds = [ 15 | { 16 | callback = mkLuaInline '' 17 | function() 18 | local ignore_filetypes = ${toLuaObject cfg.setupOpts.ignore_filetypes} 19 | if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then 20 | vim.b.miniindentscope_disable = true 21 | end 22 | end 23 | ''; 24 | desc = "Disable indentscope for certain filetypes"; 25 | event = ["FileType"]; 26 | } 27 | ]; 28 | 29 | startPlugins = ["mini-indentscope"]; 30 | 31 | pluginRC.mini-indentscope = entryAnywhere '' 32 | require("mini.indentscope").setup(${toLuaObject cfg.setupOpts}) 33 | ''; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /modules/plugins/mini/indentscope/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./indentscope.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/indentscope/indentscope.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkOption mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | inherit (lib.types) str listOf; 5 | in { 6 | options.vim.mini.indentscope = { 7 | enable = mkEnableOption "mini.indentscope"; 8 | setupOpts = mkPluginSetupOption "mini.indentscope" { 9 | ignore_filetypes = mkOption { 10 | type = listOf str; 11 | default = ["help" "neo-tree" "notify" "NvimTree" "TelescopePrompt"]; 12 | description = "File types to ignore for illuminate"; 13 | }; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /modules/plugins/mini/jump/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.jump; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-jump"]; 14 | 15 | pluginRC.mini-jump = entryAnywhere '' 16 | require("mini.jump").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/jump/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./jump.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/jump/jump.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.jump = { 10 | enable = mkEnableOption "mini.jump"; 11 | setupOpts = mkPluginSetupOption "mini.jump" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/jump2d/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.jump2d; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-jump2d"]; 14 | 15 | pluginRC.mini-jump2d = entryAnywhere '' 16 | require("mini.jump2d").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/jump2d/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./jump2d.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/jump2d/jump2d.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.jump2d = { 10 | enable = mkEnableOption "mini.jump2d"; 11 | setupOpts = mkPluginSetupOption "mini.jump2d" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/map/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.map; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-map"]; 14 | 15 | pluginRC.mini-map = entryAnywhere '' 16 | require("mini.map").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/map/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./map.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/map/map.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.map = { 10 | enable = mkEnableOption "mini.map"; 11 | setupOpts = mkPluginSetupOption "mini.map" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/misc/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.misc; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-misc"]; 14 | 15 | pluginRC.mini-misc = entryAnywhere '' 16 | require("mini.misc").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/misc/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./misc.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/misc/misc.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.misc = { 10 | enable = mkEnableOption "mini.misc"; 11 | setupOpts = mkPluginSetupOption "mini.misc" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/move/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.move; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-move"]; 14 | 15 | pluginRC.mini-move = entryAnywhere '' 16 | require("mini.move").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/move/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./move.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/move/move.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.move = { 10 | enable = mkEnableOption "mini.move"; 11 | setupOpts = mkPluginSetupOption "mini.move" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/notify/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkAssert; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.notify; 11 | in { 12 | vim = mkIf cfg.enable (mkAssert (!config.vim.notify.nvim-notify.enable) "Mini.notify is incompatible with nvim-notify!" { 13 | startPlugins = ["mini-notify"]; 14 | 15 | pluginRC.mini-notify = entryAnywhere '' 16 | require("mini.notify").setup(${toLuaObject cfg.setupOpts}) 17 | vim.notify = MiniNotify.make_notify(${toLuaObject cfg.notifyOpts}) 18 | ''; 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/mini/notify/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./notify.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/operators/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.operators; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-operators"]; 14 | 15 | pluginRC.mini-operators = entryAnywhere '' 16 | require("mini.operators").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/operators/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./operators.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/operators/operators.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.operators = { 10 | enable = mkEnableOption "mini.operators"; 11 | setupOpts = mkPluginSetupOption "mini.operators" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/pairs/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.pairs; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-pairs"]; 14 | 15 | pluginRC.mini-pairs = entryAnywhere '' 16 | require("mini.pairs").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/pairs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./pairs.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/pairs/pairs.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.pairs = { 10 | enable = mkEnableOption "mini.pairs"; 11 | setupOpts = mkPluginSetupOption "mini.pairs" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/pick/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.pick; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-pick"]; 14 | 15 | pluginRC.mini-pick = entryAnywhere '' 16 | require("mini.pick").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/pick/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./pick.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/pick/pick.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.pick = { 10 | enable = mkEnableOption "mini.pick"; 11 | setupOpts = mkPluginSetupOption "mini.pick" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/sessions/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.sessions; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-sessions"]; 14 | 15 | pluginRC.mini-sessions = entryAnywhere '' 16 | require("mini.sessions").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/sessions/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./sessions.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/sessions/sessions.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.sessions = { 10 | enable = mkEnableOption "mini.sessions"; 11 | setupOpts = mkPluginSetupOption "mini.sessions" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/snippets/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.snippets; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-snippets"]; 14 | 15 | pluginRC.mini-snippets = entryAnywhere '' 16 | require("mini.snippets").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/snippets/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./snippets.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/snippets/snippets.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.snippets = { 10 | enable = mkEnableOption "mini.snippets"; 11 | setupOpts = mkPluginSetupOption "mini.snippets" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/splitjoin/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.splitjoin; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-splitjoin"]; 14 | 15 | pluginRC.mini-splitjoin = entryAnywhere '' 16 | require("mini.splitjoin").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/splitjoin/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./splitjoin.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/splitjoin/splitjoin.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.splitjoin = { 10 | enable = mkEnableOption "mini.splitjoin"; 11 | setupOpts = mkPluginSetupOption "mini.splitjoin" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/starter/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.starter; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-starter"]; 14 | 15 | pluginRC.mini-starter = entryAnywhere '' 16 | require("mini.starter").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/starter/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./starter.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/starter/starter.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.starter = { 10 | enable = mkEnableOption "mini.starter"; 11 | setupOpts = mkPluginSetupOption "mini.starter" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/statusline/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.statusline; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-statusline"]; 14 | 15 | pluginRC.mini-statusline = entryAnywhere '' 16 | require("mini.statusline").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/statusline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./statusline.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/statusline/statusline.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.statusline = { 10 | enable = mkEnableOption "mini.statusline"; 11 | setupOpts = mkPluginSetupOption "mini.statusline" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/surround/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.surround; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-surround"]; 14 | 15 | pluginRC.mini-surround = entryAnywhere '' 16 | require("mini.surround").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/surround/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./surround.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/surround/surround.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.surround = { 10 | enable = mkEnableOption "mini.surround"; 11 | setupOpts = mkPluginSetupOption "mini.surround" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/tabline/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.tabline; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-tabline"]; 14 | 15 | pluginRC.mini-tabline = entryAnywhere '' 16 | require("mini.tabline").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/tabline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./tabline.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/tabline/tabline.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.tabline = { 10 | enable = mkEnableOption "mini.tabline"; 11 | setupOpts = mkPluginSetupOption "mini.tabline" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/test/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.test; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-test"]; 14 | 15 | pluginRC.mini-test = entryAnywhere '' 16 | require("mini.test").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/test/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./test.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/test/test.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.test = { 10 | enable = mkEnableOption "mini.test"; 11 | setupOpts = mkPluginSetupOption "mini.test" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/trailspace/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.trailspace; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-trailspace"]; 14 | 15 | pluginRC.mini-trailspace = entryAnywhere '' 16 | require("mini.trailspace").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/trailspace/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./trailspace.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/trailspace/trailspace.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.trailspace = { 10 | enable = mkEnableOption "mini.trailspace"; 11 | setupOpts = mkPluginSetupOption "mini.trailspace" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/mini/visits/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.mini.visits; 11 | in { 12 | vim = mkIf cfg.enable { 13 | startPlugins = ["mini-visits"]; 14 | 15 | pluginRC.mini-visits = entryAnywhere '' 16 | require("mini.visits").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/mini/visits/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./visits.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/mini/visits/visits.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.mini.visits = { 10 | enable = mkEnableOption "mini.visits"; 11 | setupOpts = mkPluginSetupOption "mini.visits" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/minimap/codewindow/codewindow.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.binds) mkMappingOption; 4 | in { 5 | options.vim.minimap.codewindow = { 6 | enable = mkEnableOption "codewindow plugin for minimap view"; 7 | 8 | mappings = { 9 | open = mkMappingOption "Open minimap [codewindow]" "mo"; 10 | close = mkMappingOption "Close minimap [codewindow]" "mc"; 11 | toggle = mkMappingOption "Toggle minimap [codewindow]" "mm"; 12 | toggleFocus = mkMappingOption "Toggle minimap focus [codewindow]" "mf"; 13 | }; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /modules/plugins/minimap/codewindow/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./codewindow.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/minimap/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./minimap-vim 4 | ./codewindow 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/minimap/minimap-vim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf; 8 | inherit (lib.nvim.binds) pushDownDefault; 9 | 10 | cfg = config.vim.minimap.minimap-vim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["minimap-vim"]; 15 | extraPackages = [pkgs.code-minimap]; 16 | 17 | binds.whichKey.register = pushDownDefault { 18 | "m" = "+Minimap"; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/minimap/minimap-vim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./minimap-vim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/minimap/minimap-vim/minimap-vim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.minimap.minimap-vim = { 5 | enable = mkEnableOption "minimap view [minimap-vim]"; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/notes/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./obsidian 4 | ./orgmode 5 | ./neorg 6 | ./mind-nvim 7 | ./todo-comments 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/notes/mind-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.binds) pushDownDefault; 9 | 10 | cfg = config.vim.notes.mind-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = [ 15 | "mind-nvim" 16 | ]; 17 | 18 | maps.normal = { 19 | "om" = {action = ":MindOpenMain";}; 20 | "op" = {action = ":MindOpenProject";}; 21 | "oc" = {action = ":MindClose";}; 22 | }; 23 | 24 | binds.whichKey.register = pushDownDefault { 25 | "o" = "+Notes"; 26 | }; 27 | 28 | pluginRC.mind-nvim = entryAnywhere '' 29 | require'mind'.setup() 30 | ''; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /modules/plugins/notes/mind-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./mind-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/notes/mind-nvim/mind-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.notes.mind-nvim = { 5 | enable = mkEnableOption "note organizer tool for Neovim [mind-nvim]"; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/notes/neorg/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkMerge; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.binds) pushDownDefault; 9 | inherit (lib.nvim.lua) toLuaObject; 10 | 11 | cfg = config.vim.notes.neorg; 12 | in { 13 | config = mkIf cfg.enable (mkMerge [ 14 | { 15 | vim = { 16 | startPlugins = [ 17 | "lua-utils-nvim" 18 | "nui-nvim" 19 | "nvim-nio" 20 | "pathlib-nvim" 21 | "plenary-nvim" 22 | "neorg" 23 | "neorg-telescope" 24 | ]; 25 | 26 | binds.whichKey.register = pushDownDefault { 27 | "o" = "+Notes"; 28 | }; 29 | 30 | pluginRC.neorg = entryAnywhere '' 31 | require('neorg').setup(${toLuaObject cfg.setupOpts}) 32 | ''; 33 | }; 34 | } 35 | 36 | (mkIf cfg.treesitter.enable { 37 | vim.treesitter.enable = true; 38 | vim.treesitter.grammars = [cfg.treesitter.norgPackage]; 39 | }) 40 | ]); 41 | } 42 | -------------------------------------------------------------------------------- /modules/plugins/notes/neorg/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./neorg.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/notes/obsidian/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.binds) pushDownDefault; 9 | inherit (lib.nvim.lua) toLuaObject; 10 | 11 | cfg = config.vim.notes.obsidian; 12 | in { 13 | config = mkIf cfg.enable { 14 | vim = { 15 | startPlugins = [ 16 | "obsidian-nvim" 17 | "vim-markdown" 18 | "tabular" 19 | ]; 20 | 21 | binds.whichKey.register = pushDownDefault { 22 | "o" = "+Notes"; 23 | }; 24 | 25 | pluginRC.obsidian = entryAnywhere '' 26 | require("obsidian").setup(${toLuaObject cfg.setupOpts}) 27 | ''; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/plugins/notes/obsidian/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./obsidian.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/notes/orgmode/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./orgmode.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/notes/todo-comments/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkMerge mkIf; 8 | inherit (lib.nvim.binds) mkBinding; 9 | inherit (lib.nvim.lua) toLuaObject; 10 | 11 | cfg = config.vim.notes.todo-comments; 12 | self = import ./todo-comments.nix {inherit pkgs lib;}; 13 | inherit (self.options.vim.notes.todo-comments) mappings; 14 | in { 15 | config = mkIf cfg.enable { 16 | vim = { 17 | startPlugins = [ 18 | "todo-comments-nvim" 19 | ]; 20 | 21 | maps.normal = mkMerge [ 22 | (mkBinding cfg.mappings.quickFix ":TodoQuickFix" mappings.quickFix.description) 23 | (mkIf config.vim.telescope.enable (mkBinding cfg.mappings.telescope ":TodoTelescope" mappings.telescope.description)) 24 | (mkIf config.vim.lsp.trouble.enable (mkBinding cfg.mappings.trouble ":TodoTrouble" mappings.trouble.description)) 25 | ]; 26 | 27 | pluginRC.todo-comments = '' 28 | require('todo-comments').setup(${toLuaObject cfg.setupOpts}) 29 | ''; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/plugins/notes/todo-comments/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./todo-comments.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/projects/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./project-nvim 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/projects/project-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.projects.project-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim.startPlugins = [ 14 | "project-nvim" 15 | ]; 16 | 17 | vim.pluginRC.project-nvim = entryAnywhere '' 18 | require('project_nvim').setup(${toLuaObject cfg.setupOpts}) 19 | ''; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/projects/project-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./project-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/repl/conjure/conjure.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.options) mkEnableOption; 8 | inherit (lib.modules) mkIf; 9 | 10 | cfg = config.vim.repl.conjure; 11 | in { 12 | options.vim.repl.conjure = { 13 | enable = mkEnableOption "Conjure"; 14 | }; 15 | 16 | config = mkIf cfg.enable { 17 | vim.startPlugins = [pkgs.vimPlugins.conjure]; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/repl/conjure/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./conjure.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/repl/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./conjure 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/rich-presence/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./neocord 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/rich-presence/neocord/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.presence.neocord; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim.startPlugins = ["neocord"]; 14 | 15 | vim.pluginRC.neocord = entryAnywhere '' 16 | -- Description of each option can be found in https://github.com/IogaMaster/neocord#lua 17 | require("neocord").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/rich-presence/neocord/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./neocord.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/runner/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./run-nvim 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/runner/run-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | options, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf mkDefault; 8 | inherit (lib.nvim.binds) mkKeymap; 9 | 10 | cfg = config.vim.runner.run-nvim; 11 | inherit (options.vim.runner.run-nvim) mappings; 12 | in { 13 | config = mkIf cfg.enable { 14 | vim = { 15 | lazy.plugins.run-nvim = { 16 | package = "run-nvim"; 17 | setupModule = "run"; 18 | inherit (cfg) setupOpts; 19 | 20 | cmd = "Run"; 21 | 22 | keys = [ 23 | (mkKeymap "n" cfg.mappings.run "Run" {desc = mappings.run.description;}) 24 | (mkKeymap "n" cfg.mappings.runOverride "Run!" {desc = mappings.runOverride.description;}) 25 | (mkKeymap "n" cfg.mappings.runCommand "RunPrompt" {desc = mappings.run.description;}) 26 | ]; 27 | }; 28 | 29 | binds.whichKey.register."r" = mkDefault "+Run"; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/plugins/runner/run-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./run-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/runner/run-nvim/run-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | inherit (lib.nvim.binds) mkMappingOption; 5 | in { 6 | options = { 7 | vim.runner.run-nvim = { 8 | enable = mkEnableOption "run.nvim"; 9 | setupOpts = mkPluginSetupOption "run.nvim" {}; 10 | 11 | mappings = { 12 | run = mkMappingOption "Run cached" "ri"; 13 | runOverride = mkMappingOption "Run and override" "ro"; 14 | runCommand = mkMappingOption "Run prompt" "rc"; 15 | }; 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/plugins/session/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-session-manager 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/session/nvim-session-manager/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-session-manager.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/snippets/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./luasnip 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/snippets/luasnip/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.snippets.luasnip; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | lazy.plugins.luasnip = { 13 | package = "luasnip"; 14 | 15 | lazy = true; 16 | 17 | setupModule = "luasnip"; 18 | inherit (cfg) setupOpts; 19 | 20 | after = cfg.loaders; 21 | }; 22 | startPlugins = cfg.providers; 23 | autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable { 24 | sources = {luasnip = "[LuaSnip]";}; 25 | sourcePlugins = ["cmp-luasnip"]; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/plugins/snippets/luasnip/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./luasnip.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/spellcheck/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./vim-dirtytalk 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/spellcheck/vim-dirtytalk/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAfter; 8 | cfg = config.vim.spellcheck; 9 | in { 10 | config = mkIf cfg.programmingWordlist.enable { 11 | vim = { 12 | startPlugins = ["vim-dirtytalk"]; 13 | 14 | spellcheck.enable = true; 15 | 16 | # vim-dirtytalk doesn't have any setup but we would 17 | # like to append programming to spelllangs as soon as 18 | # possible while the plugin is enabled and the state 19 | # directory can be found. 20 | pluginRC.vim-dirtytalk = entryAfter ["spellcheck"] '' 21 | -- If Neovim can find (or access) the state directory 22 | -- then append "programming" wordlist from vim-dirtytalk 23 | -- to spelllang table. If path cannot be found, display 24 | -- an error and avoid appending the programming words 25 | if vim.fn.isdirectory(vim.fn.stdpath('state')) == 1 then 26 | vim.opt.spelllang:append("programming") 27 | else 28 | vim.notify("State path does not exist: " .. state_path, vim.log.levels.ERROR) 29 | end 30 | ''; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /modules/plugins/spellcheck/vim-dirtytalk/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./vim-dirtytalk.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/spellcheck/vim-dirtytalk/vim-dirtytalk.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.modules) mkAliasOptionModule; 3 | in { 4 | imports = [ 5 | (mkAliasOptionModule ["vim" "spellcheck" "vim-dirtytalk" "enable"] ["vim" "spellcheck" "programmingWordlist" "enable"]) 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/statusline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./lualine 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/statusline/lualine/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./lualine.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/statusline/lualine/supported_themes.nix: -------------------------------------------------------------------------------- 1 | [ 2 | "tokyonight" 3 | "onedark" 4 | "catppuccin" 5 | "oxocarbon" 6 | "gruvbox" 7 | "nord" 8 | ] 9 | -------------------------------------------------------------------------------- /modules/plugins/tabline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-bufferline 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/tabline/nvim-bufferline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-bufferline.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/terminal/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./toggleterm 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/terminal/toggleterm/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./toggleterm.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/theme/config.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.modules) mkDefault; 3 | in { 4 | config = { 5 | vim.theme = { 6 | enable = mkDefault false; 7 | name = mkDefault "onedark"; 8 | style = mkDefault "darker"; 9 | transparent = mkDefault false; 10 | extraConfig = mkDefault ""; 11 | }; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/theme/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./theme.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/treesitter/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | # treesitter extras 4 | ./ts-context 5 | ./ts-textobjects 6 | 7 | ./treesitter.nix 8 | ./config.nix 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /modules/plugins/treesitter/ts-context/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAfter; 9 | 10 | inherit (config.vim) treesitter; 11 | cfg = treesitter.context; 12 | in { 13 | config = mkIf (treesitter.enable && cfg.enable) { 14 | vim = { 15 | startPlugins = ["nvim-treesitter-context"]; 16 | 17 | # set up treesitter-context after Treesitter. The ordering 18 | # should not matter, but there is no harm in doing this 19 | pluginRC.treesitter-context = entryAfter ["treesitter"] '' 20 | require("treesitter-context").setup(${toLuaObject cfg.setupOpts}) 21 | ''; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /modules/plugins/treesitter/ts-context/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./context.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/treesitter/ts-textobjects/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAfter; 9 | 10 | inherit (config.vim) treesitter; 11 | cfg = treesitter.textobjects; 12 | in { 13 | config = mkIf (treesitter.enable && cfg.enable) { 14 | vim = { 15 | startPlugins = ["nvim-treesitter-textobjects"]; 16 | 17 | # set up treesitter-textobjects after Treesitter, whose config we're adding to. 18 | pluginRC.treesitter-textobjects = entryAfter ["treesitter"] '' 19 | require("nvim-treesitter.configs").setup({textobjects = ${toLuaObject cfg.setupOpts}}) 20 | ''; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/treesitter/ts-textobjects/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./textobjects.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/treesitter/ts-textobjects/textobjects.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.treesitter.textobjects = { 6 | enable = mkEnableOption "Treesitter textobjects"; 7 | setupOpts = 8 | mkPluginSetupOption "treesitter-textobjects" {} 9 | // { 10 | example = { 11 | select = { 12 | enable = true; 13 | lookahead = true; 14 | keymaps = { 15 | af = "@function.outer"; 16 | }; 17 | }; 18 | }; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/ui/borders/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./borders.nix 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/ui/breadcrumbs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./breadcrumbs.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/colorizer/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.ui.colorizer; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim.startPlugins = [ 14 | "nvim-colorizer-lua" 15 | ]; 16 | 17 | vim.pluginRC.colorizer = entryAnywhere '' 18 | require('colorizer').setup(${toLuaObject cfg.setupOpts}) 19 | ''; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/ui/colorizer/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./colorizer.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./noice 4 | ./modes 5 | ./nvim-ufo 6 | ./notifications 7 | ./smartcolumn 8 | ./colorizer 9 | ./illuminate 10 | ./breadcrumbs 11 | ./borders 12 | ./fastaction 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /modules/plugins/ui/fastaction/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf mkDefault; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.ui.fastaction; 11 | borderCfg = config.vim.ui.borders.plugins.fastaction; 12 | in { 13 | config = mkIf cfg.enable { 14 | vim = { 15 | ui.fastaction.setupOpts = { 16 | register_ui_select = mkDefault true; 17 | popup.border = mkIf borderCfg.enable borderCfg.style; 18 | }; 19 | 20 | startPlugins = ["fastaction-nvim"]; 21 | pluginRC.fastaction = entryAnywhere "require('fastaction').setup(${toLuaObject cfg.setupOpts})"; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /modules/plugins/ui/fastaction/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./fastaction-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/fastaction/fastaction-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.ui.fastaction = { 6 | enable = mkEnableOption "overriding vim.ui.select with fastaction.nvim"; 7 | setupOpts = mkPluginSetupOption "fastaction" {}; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/ui/illuminate/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.ui.illuminate; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["vim-illuminate"]; 15 | 16 | # vim-illuminate does not have a setup function. It is instead called 'configure' 17 | # and does what you expect from a setup function. Wild. 18 | pluginRC.vim-illuminate = entryAnywhere '' 19 | require('illuminate').configure(${toLuaObject cfg.setupOpts}) 20 | ''; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/ui/illuminate/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./illuminate.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/illuminate/illuminate.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkOption mkEnableOption; 3 | inherit (lib.types) listOf str; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | options.vim.ui.illuminate = { 7 | enable = mkEnableOption '' 8 | automatically highlight other uses of the word under the cursor [vim-illuminate] 9 | ''; 10 | 11 | setupOpts = mkPluginSetupOption "vim-illuminate" { 12 | filetypes_denylist = mkOption { 13 | type = listOf str; 14 | default = ["dirvish" "fugitive" "help" "neo-tree" "notify" "NvimTree" "TelescopePrompt"]; 15 | description = "Filetypes to not illuminate, this overrides `filetypes_allowlist`"; 16 | }; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/plugins/ui/modes/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.ui.modes-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim.startPlugins = [ 14 | "modes-nvim" 15 | ]; 16 | 17 | vim.pluginRC.modes-nvim = entryAnywhere '' 18 | require('modes').setup(${toLuaObject cfg.setupOpts}) 19 | ''; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/ui/modes/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./modes.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/noice/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf; 8 | inherit (lib.lists) optionals; 9 | inherit (lib.nvim.lua) toLuaObject; 10 | inherit (lib.nvim.dag) entryAnywhere; 11 | 12 | cfg = config.vim.ui.noice; 13 | tscfg = config.vim.treesitter; 14 | 15 | defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown]; 16 | in { 17 | config = mkIf cfg.enable { 18 | vim = { 19 | startPlugins = [ 20 | "noice-nvim" 21 | "nui-nvim" 22 | ]; 23 | 24 | treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars; 25 | 26 | pluginRC.noice-nvim = entryAnywhere '' 27 | require("noice").setup(${toLuaObject cfg.setupOpts}) 28 | ''; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /modules/plugins/ui/noice/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./noice.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/notifications/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-notify 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/ui/notifications/nvim-notify/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.notify.nvim-notify; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["nvim-notify"]; 15 | 16 | pluginRC.nvim-notify = entryAnywhere '' 17 | local notify = require("notify") 18 | notify.setup(${toLuaObject cfg.setupOpts}) 19 | vim.notify = notify.notify 20 | ''; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/ui/notifications/nvim-notify/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-notify.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/nvim-ufo/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.ui.nvim-ufo; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | startPlugins = ["promise-async"]; 13 | lazy.plugins.nvim-ufo = { 14 | package = "nvim-ufo"; 15 | setupModule = "ufo"; 16 | inherit (cfg) setupOpts; 17 | }; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/ui/nvim-ufo/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./nvim-ufo.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/ui/nvim-ufo/nvim-ufo.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.ui.nvim-ufo = { 6 | enable = mkEnableOption "nvim-ufo"; 7 | setupOpts = mkPluginSetupOption "nvim-ufo" {}; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/ui/smartcolumn/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.ui.smartcolumn; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["smartcolumn-nvim"]; 15 | 16 | pluginRC.smartcolumn = entryAnywhere '' 17 | require("smartcolumn").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/ui/smartcolumn/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./smartcolumn.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/cheatsheet/cheatsheet.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.binds.cheatsheet = { 5 | enable = mkEnableOption "cheatsheet-nvim: searchable cheatsheet for nvim using telescope"; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/cheatsheet/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.strings) optionalString; 8 | 9 | cfg = config.vim.binds.cheatsheet; 10 | in { 11 | config = mkIf cfg.enable { 12 | vim.lazy.plugins.cheatsheet-nvim = { 13 | package = "cheatsheet-nvim"; 14 | setupModule = "cheatsheet"; 15 | setupOpts = {}; 16 | cmd = ["Cheatsheet" "CheatsheetEdit"]; 17 | 18 | before = optionalString config.vim.lazy.enable "require('lz.n').trigger_load('telescope')"; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/cheatsheet/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./cheatsheet.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./which-key 4 | ./cheatsheet 5 | ./hardtime 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/hardtime/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.binds.hardtime-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["hardtime-nvim"]; 15 | 16 | pluginRC.hardtime = entryAnywhere '' 17 | require("hardtime").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/hardtime/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./hardtime.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/hardtime/hardtime.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.binds.hardtime-nvim = { 6 | enable = mkEnableOption "hardtime helper for no repeat keybinds"; 7 | 8 | setupOpts = mkPluginSetupOption "hardtime-nvim" {}; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/which-key/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.attrsets) mapAttrsToList; 9 | inherit (lib.generators) mkLuaInline; 10 | inherit (lib.nvim.dag) entryAnywhere; 11 | 12 | cfg = config.vim.binds.whichKey; 13 | register = mapAttrsToList (n: v: mkLuaInline "{ '${n}', desc = '${v}' }") cfg.register; 14 | in { 15 | config = mkIf cfg.enable { 16 | vim = { 17 | startPlugins = ["which-key-nvim"]; 18 | 19 | pluginRC.whichkey = entryAnywhere '' 20 | local wk = require("which-key") 21 | wk.setup (${toLuaObject cfg.setupOpts}) 22 | wk.add(${toLuaObject register}) 23 | ''; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/plugins/utility/binds/which-key/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./which-key.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/ccc/ccc.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.binds) mkMappingOption; 4 | in { 5 | options.vim.utility.ccc = { 6 | enable = mkEnableOption "ccc color picker for neovim"; 7 | 8 | mappings = { 9 | quit = mkMappingOption "Cancel and close the UI without replace or insert" ""; 10 | increase10 = mkMappingOption "Increase the value times delta of the slider" ""; 11 | decrease10 = mkMappingOption "Decrease the value times delta of the slider" ""; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/plugins/utility/ccc/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./ccc.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./binds 4 | ./ccc 5 | ./diffview 6 | ./direnv 7 | ./fzf-lua 8 | ./gestures 9 | ./harpoon 10 | ./icon-picker 11 | ./images 12 | ./leetcode-nvim 13 | ./mkdir 14 | ./motion 15 | ./multicursors 16 | ./new-file-template 17 | ./nix-develop 18 | ./oil-nvim 19 | ./outline 20 | ./preview 21 | ./sleuth 22 | ./snacks-nvim 23 | ./surround 24 | ./telescope 25 | ./wakatime 26 | ./yanky-nvim 27 | ./yazi-nvim 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /modules/plugins/utility/diffview/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.utility.diffview-nvim; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | startPlugins = ["plenary-nvim"]; 13 | lazy.plugins.diffview-nvim = { 14 | package = "diffview-nvim"; 15 | cmd = ["DiffviewClose" "DiffviewFileHistory" "DiffviewFocusFiles" "DiffviewLog" "DiffviewOpen" "DiffviewRefresh" "DiffviewToggleFiles"]; 16 | setupModule = "diffview"; 17 | inherit (cfg) setupOpts; 18 | }; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/utility/diffview/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./config.nix 4 | ./diffview.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/diffview/diffview.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.utility.diffview-nvim = { 6 | enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev"; 7 | setupOpts = mkPluginSetupOption "Fidget" {}; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/plugins/utility/direnv/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.utility.direnv; 9 | in { 10 | vim = mkIf cfg.enable { 11 | startPlugins = ["direnv-vim"]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/utility/direnv/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./direnv.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/direnv/direnv.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.utility.direnv.enable = mkEnableOption "syncing nvim shell environment with direnv's using `direnv.vim`"; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/utility/fzf-lua/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.fzf-lua; 9 | in { 10 | vim.lazy.plugins."fzf-lua" = mkIf cfg.enable { 11 | package = "fzf-lua"; 12 | cmd = ["FzfLua"]; 13 | setupModule = "fzf-lua"; 14 | setupOpts = cfg.setupOpts // {"@1" = cfg.profile;}; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /modules/plugins/utility/fzf-lua/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./fzf-lua.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/fzf-lua/fzf-lua.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib.types) enum str; 8 | inherit (lib.options) mkEnableOption mkOption; 9 | inherit (lib.nvim.types) mkPluginSetupOption borderType; 10 | in { 11 | options.vim.fzf-lua = { 12 | enable = mkEnableOption "fzf-lua"; 13 | setupOpts = mkPluginSetupOption "fzf-lua" { 14 | fzf_bin = mkOption { 15 | type = str; 16 | default = "${lib.getExe pkgs.fzf}"; 17 | description = "Path to fzf executable"; 18 | }; 19 | winopts.border = mkOption { 20 | type = borderType; 21 | default = config.vim.ui.borders.globalStyle; 22 | description = "Border type for the fzf-lua picker window"; 23 | }; 24 | }; 25 | profile = mkOption { 26 | type = enum [ 27 | "default" 28 | "default-title" 29 | "fzf-native" 30 | "fzf-tmux" 31 | "fzf-vim" 32 | "max-perf" 33 | "telescope" 34 | "skim" 35 | "borderless" 36 | "borderless-full" 37 | "border-fused" 38 | ]; 39 | default = "default"; 40 | description = "The configuration profile to use"; 41 | }; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /modules/plugins/utility/gestures/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./gesture-nvim 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/utility/gestures/gesture-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./gesture-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/gestures/gesture-nvim/gesture-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.binds) mkMappingOption; 4 | in { 5 | options.vim.gestures.gesture-nvim = { 6 | enable = mkEnableOption "gesture-nvim: mouse gestures"; 7 | 8 | mappings = { 9 | draw = mkMappingOption "Start drawing [gesture.nvim]" ""; 10 | finish = mkMappingOption "Finish drawing [gesture.nvim]" ""; 11 | }; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/utility/harpoon/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./harpoon.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/icon-picker/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.utility.icon-picker; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim.startPlugins = ["dressing-nvim"]; 12 | 13 | vim.lazy.plugins.icon-picker-nvim = { 14 | package = "icon-picker-nvim"; 15 | setupModule = "icon-picker"; 16 | setupOpts = { 17 | disable_legacy_commands = true; 18 | }; 19 | 20 | cmd = ["IconPickerInsert" "IconPickerNormal" "IconPickerYank"]; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/utility/icon-picker/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./icon-picker.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/icon-picker/icon-picker.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.utility.icon-picker = { 5 | enable = mkEnableOption "nerdfonts icon picker for nvim"; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/utility/images/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./image-nvim 4 | ./img-clip 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/images/image-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.utility.images.image-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = [ 15 | "image-nvim" 16 | ]; 17 | 18 | luaPackages = [ 19 | "magick" 20 | ]; 21 | 22 | pluginRC.image-nvim = entryAnywhere '' 23 | require("image").setup( 24 | ${toLuaObject cfg.setupOpts} 25 | ) 26 | ''; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/plugins/utility/images/image-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./image-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/images/img-clip/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.utility.images.img-clip; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = [ 15 | "img-clip" 16 | ]; 17 | 18 | pluginRC.image-nvim = entryAnywhere '' 19 | require("img-clip").setup(${toLuaObject cfg.setupOpts}) 20 | ''; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/utility/images/img-clip/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./img-clip.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/images/img-clip/img-clip.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | options.vim.utility.images.img-clip = { 7 | enable = mkEnableOption "img-clip to paste images into any markup language"; 8 | 9 | setupOpts = mkPluginSetupOption "img-clip" {}; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /modules/plugins/utility/leetcode-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.utility.leetcode-nvim; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | startPlugins = [ 13 | "leetcode-nvim" 14 | "plenary-nvim" 15 | "fzf-lua" 16 | "nui-nvim" 17 | ]; 18 | 19 | lazy.plugins.leetcode-nvim = { 20 | package = "leetcode-nvim"; 21 | setupModule = "leetcode"; 22 | inherit (cfg) setupOpts; 23 | }; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/plugins/utility/leetcode-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./leetcode-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/mkdir/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | cfg = config.vim.utility.mkdir; 8 | in { 9 | vim = mkIf cfg.enable { 10 | startPlugins = ["mkdir-nvim"]; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/plugins/utility/mkdir/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./mkdir.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/mkdir/mkdir.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.utility.mkdir.enable = mkEnableOption '' 5 | parent directory creation when editing a nested path that does not exist using `mkdir.nvim` 6 | ''; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./flash 4 | ./hop 5 | ./leap 6 | ./precognition 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/flash/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.binds) mkKeymap; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | inherit (lib.nvim.dag) entryAnywhere; 10 | 11 | cfg = config.vim.utility.motion.flash-nvim; 12 | in { 13 | config = mkIf cfg.enable { 14 | vim = { 15 | lazy.plugins = { 16 | "flash-nvim" = { 17 | package = "flash-nvim"; 18 | setupModule = "flash"; 19 | setupOpts = cfg.setupOpts; 20 | 21 | lazy = true; 22 | 23 | keys = [ 24 | (mkKeymap ["n" "o" "x"] cfg.mappings.jump "lua require(\"flash\").jump()" {desc = "Flash";}) 25 | (mkKeymap ["n" "o" "x"] cfg.mappings.treesitter "lua require(\"flash\").treesitter()" {desc = "Flash Treesitter";}) 26 | (mkKeymap "o" cfg.mappings.remote "lua require(\"flash\").remote()" {desc = "Remote Flash";}) 27 | (mkKeymap ["o" "x"] cfg.mappings.treesitter_search "lua require(\"flash\").treesitter_search()" {desc = "Treesitter Search";}) 28 | (mkKeymap "c" cfg.mappings.toggle "lua require(\"flash\").toggle()" {desc = "Toggle Flash Search";}) 29 | ]; 30 | }; 31 | }; 32 | }; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/flash/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./flash.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/flash/flash.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption mkOption; 3 | inherit (lib.types) nullOr str; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | options.vim.utility.motion.flash-nvim = { 7 | enable = mkEnableOption "enhanced code navigation with flash.nvim"; 8 | setupOpts = mkPluginSetupOption "flash-nvim" {}; 9 | 10 | mappings = { 11 | jump = mkOption { 12 | type = nullOr str; 13 | default = "s"; 14 | description = "Jump"; 15 | }; 16 | treesitter = mkOption { 17 | type = nullOr str; 18 | default = "S"; 19 | description = "Treesitter"; 20 | }; 21 | remote = mkOption { 22 | type = nullOr str; 23 | default = "r"; 24 | description = "Remote Flash"; 25 | }; 26 | treesitter_search = mkOption { 27 | type = nullOr str; 28 | default = "R"; 29 | description = "Treesitter Search"; 30 | }; 31 | toggle = mkOption { 32 | type = nullOr str; 33 | default = ""; 34 | description = "Toggle Flash Search"; 35 | }; 36 | }; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/hop/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.utility.motion.hop; 11 | 12 | self = import ./hop.nix {inherit lib;}; 13 | 14 | mappingDefinitions = self.options.vim.utility.motion.hop.mappings; 15 | mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; 16 | in { 17 | config = mkIf cfg.enable { 18 | vim.startPlugins = ["hop-nvim"]; 19 | 20 | vim.maps.normal = mkSetBinding mappings.hop " HopPattern"; 21 | 22 | vim.pluginRC.hop-nvim = entryAnywhere '' 23 | require('hop').setup() 24 | ''; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/hop/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./hop.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/hop/hop.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.binds) mkMappingOption; 4 | in { 5 | options.vim.utility.motion.hop = { 6 | mappings = { 7 | hop = mkMappingOption "Jump to occurrences [hop.nvim]" "h"; 8 | }; 9 | 10 | enable = mkEnableOption "Hop.nvim plugin (easy motion)"; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/leap/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./leap.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/leap/leap.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption mkOption; 3 | inherit (lib.types) nullOr str; 4 | in { 5 | options.vim.utility.motion.leap = { 6 | enable = mkEnableOption "leap.nvim plugin (easy motion)"; 7 | 8 | mappings = { 9 | leapForwardTo = mkOption { 10 | type = nullOr str; 11 | description = "Leap forward to"; 12 | default = "ss"; 13 | }; 14 | leapBackwardTo = mkOption { 15 | type = nullOr str; 16 | description = "Leap backward to"; 17 | default = "sS"; 18 | }; 19 | leapForwardTill = mkOption { 20 | type = nullOr str; 21 | description = "Leap forward till"; 22 | default = "sx"; 23 | }; 24 | leapBackwardTill = mkOption { 25 | type = nullOr str; 26 | description = "Leap backward till"; 27 | default = "sX"; 28 | }; 29 | leapFromWindow = mkOption { 30 | type = nullOr str; 31 | description = "Leap from window"; 32 | default = "gs"; 33 | }; 34 | }; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/precognition/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.utility.motion.precognition; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim = { 12 | startPlugins = ["precognition-nvim"]; 13 | luaConfigRC.precognition = lib.nvim.dag.entryAnywhere '' 14 | require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts}) 15 | ''; 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/plugins/utility/motion/precognition/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./precognition.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/multicursors/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | cfg = config.vim.utility.multicursors; 8 | in { 9 | config = mkIf cfg.enable { 10 | vim = { 11 | startPlugins = ["hydra-nvim"]; 12 | lazy.plugins."multicursors-nvim" = { 13 | package = "multicursors-nvim"; 14 | setupModule = "multicursors"; 15 | inherit (cfg) setupOpts; 16 | 17 | event = ["DeferredUIEnter"]; 18 | cmd = ["MCstart" "MCvisual" "MCclear" "MCpattern" "MCvisualPattern" "MCunderCursor"]; 19 | keys = [ 20 | { 21 | mode = ["v" "n"]; 22 | key = "mcs"; 23 | action = ":MCstart"; 24 | desc = "Create a selection for selected text or word under the cursor [multicursors.nvim]"; 25 | } 26 | { 27 | mode = ["v" "n"]; 28 | key = "mcp"; 29 | action = ":MCpattern"; 30 | desc = "Create a selection for pattern entered [multicursors.nvim]"; 31 | } 32 | ]; 33 | }; 34 | }; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /modules/plugins/utility/multicursors/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./multicursors.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/new-file-template/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | 10 | cfg = config.vim.utility.new-file-template; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = [ 15 | "new-file-template-nvim" 16 | ]; 17 | 18 | pluginRC.new-file-template = entryAnywhere '' 19 | require('new-file-template').setup(${toLuaObject cfg.setupOpts}) 20 | ''; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/plugins/utility/new-file-template/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./new-file-template.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/nix-develop/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | cfg = config.vim.utility.nix-develop; 8 | in { 9 | vim = mkIf cfg.enable { 10 | startPlugins = ["nix-develop-nvim"]; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/plugins/utility/nix-develop/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nix-develop.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/nix-develop/nix-develop.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.utility.nix-develop.enable = mkEnableOption "in-neovim `nix develop`, `nix shell`, and more using `nix-develop.nvim`"; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/utility/oil-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.utility.oil-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["oil-nvim"]; 15 | pluginRC.oil-nvim = entryAnywhere '' 16 | require("oil").setup(${toLuaObject cfg.setupOpts}); 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/utility/oil-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./oil-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/oil-nvim/oil-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.utility.oil-nvim = { 6 | enable = mkEnableOption '' 7 | Neovim file explorer: edit your filesystem like a buffer [oil-nvim] 8 | ''; 9 | 10 | setupOpts = mkPluginSetupOption "oil-nvim" {}; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | inherit (lib.nvim.binds) mkMappingOption; 5 | in { 6 | options.vim.utility.outline.aerial-nvim = { 7 | enable = mkEnableOption "Aerial.nvim"; 8 | setupOpts = mkPluginSetupOption "aerial.nvim" {}; 9 | 10 | mappings = { 11 | toggle = mkMappingOption "Toggle aerial window" "gO"; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/plugins/utility/outline/aerial-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | options, 3 | config, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf; 8 | inherit (lib.nvim.binds) mkKeymap; 9 | 10 | cfg = config.vim.utility.outline.aerial-nvim; 11 | inherit (options.vim.utility.outline.aerial-nvim) mappings; 12 | in { 13 | config = mkIf cfg.enable { 14 | vim = { 15 | lazy.plugins.aerial-nvim = { 16 | package = "aerial-nvim"; 17 | 18 | setupModule = "aerial"; 19 | inherit (cfg) setupOpts; 20 | 21 | cmd = [ 22 | "AerialClose" 23 | "AerialCloseAll" 24 | "AerialGo" 25 | "AerialInfo" 26 | "AerialNavClose" 27 | "AerialNavOpen" 28 | "AerialNavToggle" 29 | "AerialNext" 30 | "AerialOpen" 31 | "AerialOpenAll" 32 | "AerialPrev" 33 | "AerialToggle" 34 | ]; 35 | 36 | keys = [ 37 | (mkKeymap "n" cfg.mappings.toggle ":AerialToggle" {desc = mappings.toggle.description;}) 38 | ]; 39 | }; 40 | }; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /modules/plugins/utility/outline/aerial-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./aerial-nvim.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/outline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./aerial-nvim 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /modules/plugins/utility/preview/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./markdown-preview 4 | ./glow 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/preview/glow/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf mkMerge; 8 | inherit (lib.nvim.binds) mkBinding pushDownDefault; 9 | inherit (lib.nvim.dag) entryAnywhere; 10 | 11 | cfg = config.vim.utility.preview.glow; 12 | self = import ./glow.nix { 13 | inherit lib config pkgs; 14 | }; 15 | inherit (self.options.vim.utility.preview.glow) mappings; 16 | in { 17 | config = mkIf cfg.enable { 18 | vim.startPlugins = ["glow-nvim"]; 19 | 20 | vim.maps.normal = mkMerge [ 21 | (mkBinding cfg.mappings.openPreview ":Glow" mappings.openPreview.description) 22 | ]; 23 | 24 | vim.binds.whichKey.register = pushDownDefault { 25 | "pm" = "+Preview Markdown"; 26 | }; 27 | 28 | vim.pluginRC.glow = entryAnywhere '' 29 | require('glow').setup({ 30 | glow_path = "${pkgs.glow}/bin/glow" 31 | }); 32 | ''; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /modules/plugins/utility/preview/glow/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./glow.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/preview/glow/glow.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.modules) mkRenamedOptionModule; 3 | inherit (lib.options) mkEnableOption; 4 | inherit (lib.nvim.binds) mkMappingOption; 5 | in { 6 | imports = [ 7 | (mkRenamedOptionModule ["vim" "languages" "markdown" "glow" "enable"] ["vim" "utility" "preview" "glow" "enable"]) 8 | ]; 9 | 10 | options.vim.utility.preview = { 11 | glow = { 12 | enable = mkEnableOption "markdown preview in neovim with glow"; 13 | mappings.openPreview = mkMappingOption "Open preview" "p"; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /modules/plugins/utility/preview/markdown-preview/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf; 8 | 9 | cfg = config.vim.utility.preview.markdownPreview; 10 | in { 11 | config = mkIf cfg.enable { 12 | vim.startPlugins = [pkgs.vimPlugins.markdown-preview-nvim]; 13 | 14 | vim.globals = { 15 | mkdp_auto_start = cfg.autoStart; 16 | mkdp_auto_close = cfg.autoClose; 17 | mkdp_refresh_slow = cfg.lazyRefresh; 18 | mkdp_filetypes = cfg.filetypes; 19 | mkdp_command_for_global = cfg.alwaysAllowPreview; 20 | mkdp_open_to_the_world = cfg.broadcastServer; 21 | mkdp_open_ip = cfg.customIP; 22 | mkdp_port = cfg.customPort; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /modules/plugins/utility/preview/markdown-preview/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./markdown-preview.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/sleuth/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | cfg = config.vim.utility.sleuth; 8 | in { 9 | vim.startPlugins = mkIf cfg.enable ["vim-sleuth"]; 10 | } 11 | -------------------------------------------------------------------------------- /modules/plugins/utility/sleuth/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./sleuth.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/sleuth/sleuth.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | in { 4 | options.vim.utility.sleuth.enable = mkEnableOption '' 5 | automatically adjusting options such as `shiftwidth` or `expandtab`, using `vim-sleuth` 6 | ''; 7 | } 8 | -------------------------------------------------------------------------------- /modules/plugins/utility/snacks-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.utility.snacks-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["snacks-nvim"]; 15 | pluginRC.snacks-nvim = entryAnywhere '' 16 | require("snacks").setup(${toLuaObject cfg.setupOpts}); 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/utility/snacks-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./snacks-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/snacks-nvim/snacks-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption; 3 | inherit (lib.nvim.types) mkPluginSetupOption; 4 | in { 5 | options.vim.utility.snacks-nvim = { 6 | enable = mkEnableOption '' 7 | collection of QoL plugins for Neovim [snacks-nvim] 8 | ''; 9 | 10 | setupOpts = mkPluginSetupOption "snacks-nvim" {}; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/plugins/utility/surround/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.utility.surround; 9 | mkLznKey = mode: key: { 10 | inherit mode key; 11 | }; 12 | in { 13 | config = mkIf cfg.enable { 14 | vim = { 15 | lazy.plugins.nvim-surround = { 16 | package = "nvim-surround"; 17 | setupModule = "nvim-surround"; 18 | inherit (cfg) setupOpts; 19 | 20 | event = ["BufReadPre" "BufNewFile"]; 21 | 22 | keys = [ 23 | (mkLznKey "i" cfg.setupOpts.keymaps.insert) 24 | (mkLznKey "i" cfg.setupOpts.keymaps.insert_line) 25 | (mkLznKey "x" cfg.setupOpts.keymaps.visual) 26 | (mkLznKey "x" cfg.setupOpts.keymaps.visual_line) 27 | (mkLznKey "n" cfg.setupOpts.keymaps.normal) 28 | (mkLznKey "n" cfg.setupOpts.keymaps.normal_cur) 29 | (mkLznKey "n" cfg.setupOpts.keymaps.normal_line) 30 | (mkLznKey "n" cfg.setupOpts.keymaps.normal_cur_line) 31 | (mkLznKey "n" cfg.setupOpts.keymaps.delete) 32 | (mkLznKey "n" cfg.setupOpts.keymaps.change) 33 | (mkLznKey "n" cfg.setupOpts.keymaps.change_line) 34 | ]; 35 | }; 36 | }; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /modules/plugins/utility/surround/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./config.nix 4 | ./surround.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/telescope/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./telescope.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/wakatime/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: let 7 | inherit (lib.modules) mkIf; 8 | inherit (lib.meta) getExe; 9 | 10 | cfg = config.vim.utility.vim-wakatime; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = [pkgs.vimPlugins.vim-wakatime]; 15 | 16 | # Wakatime configuration is stored as vim globals. 17 | globals = { 18 | "wakatime_CLIPath" = mkIf (cfg.cli-package != null) "${getExe cfg.cli-package}"; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/plugins/utility/wakatime/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./vim-wakatime.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/wakatime/vim-wakatime.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption mkOption; 7 | inherit (lib.types) nullOr package; 8 | in { 9 | options.vim.utility.vim-wakatime = { 10 | enable = mkEnableOption '' 11 | automatic time tracking and metrics generated from your programming activity [vim-wakatime] 12 | ''; 13 | 14 | cli-package = mkOption { 15 | type = nullOr package; 16 | default = pkgs.wakatime-cli; 17 | example = null; 18 | description = '' 19 | The package that should be used for wakatime-cli. 20 | Set as null to use the default path in {env}`$XDG_DATA_HOME` 21 | ''; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /modules/plugins/utility/yanky-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./yanky-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/yanky-nvim/yanky-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkOption mkEnableOption; 3 | inherit (lib.types) enum; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | in { 6 | options.vim.utility.yanky-nvim = { 7 | enable = mkEnableOption '' 8 | improved Yank and Put functionalities for Neovim [yanky-nvim] 9 | ''; 10 | 11 | setupOpts = mkPluginSetupOption "yanky-nvim" { 12 | ring.storage = mkOption { 13 | type = enum ["shada" "sqlite" "memory"]; 14 | default = "shada"; 15 | example = "sqlite"; 16 | description = '' 17 | storage mode for ring values. 18 | 19 | - **shada**: this will save pesistantly using Neovim ShaDa feature. 20 | This means that history will be persisted between each session of Neovim. 21 | - **memory**: each Neovim instance will have his own history and it will be 22 | lost between sessions. 23 | - **sqlite**: more reliable than `shada`, requires `sqlite.lua` as a dependency. 24 | nvf will add this dependency to `PATH` automatically. 25 | ''; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/plugins/utility/yazi-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | options, 3 | config, 4 | pkgs, 5 | lib, 6 | ... 7 | }: let 8 | inherit (lib.modules) mkIf; 9 | inherit (lib.nvim.binds) mkKeymap; 10 | 11 | cfg = config.vim.utility.yazi-nvim; 12 | keys = cfg.mappings; 13 | 14 | inherit (options.vim.utility.yazi-nvim) mappings; 15 | in { 16 | config = mkIf cfg.enable { 17 | vim = { 18 | startPlugins = ["snacks-nvim"]; 19 | lazy.plugins."yazi.nvim" = { 20 | package = pkgs.vimPlugins.yazi-nvim; 21 | setupModule = "yazi"; 22 | inherit (cfg) setupOpts; 23 | event = ["BufAdd" "VimEnter"]; 24 | 25 | keys = [ 26 | (mkKeymap "n" keys.openYazi "Yazi" {desc = mappings.openYazi.description;}) 27 | (mkKeymap "n" keys.openYaziDir "Yazi cwd" {desc = mappings.openYaziDir.description;}) 28 | (mkKeymap "n" keys.yaziToggle "Yazi toggle" {desc = mappings.yaziToggle.description;}) 29 | ]; 30 | }; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /modules/plugins/utility/yazi-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./yazi-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/utility/yazi-nvim/yazi-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkEnableOption mkOption; 3 | inherit (lib.types) bool; 4 | inherit (lib.nvim.types) mkPluginSetupOption; 5 | inherit (lib.nvim.binds) mkMappingOption; 6 | in { 7 | options.vim.utility.yazi-nvim = { 8 | enable = mkEnableOption '' 9 | companion plugin for the yazi terminal file manager [yazi-nvim] 10 | ''; 11 | 12 | mappings = { 13 | openYazi = mkMappingOption "Open yazi at the current file [yazi.nvim]" "-"; 14 | openYaziDir = mkMappingOption "Open the file manager in nvim's working directory [yazi.nvim]" "cw"; 15 | yaziToggle = mkMappingOption "Resume the last yazi session [yazi.nvim]" ""; 16 | }; 17 | 18 | setupOpts = mkPluginSetupOption "yazi-nvim" { 19 | open_for_directories = mkOption { 20 | type = bool; 21 | default = false; 22 | description = "Whether to open Yazi instead of netrw"; 23 | }; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/plugins/visuals/cellular-automaton/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./cellular-automaton.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/cinnamon-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.cinnamon-nvim; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["cinnamon-nvim"]; 15 | 16 | pluginRC.cursorline = entryAnywhere '' 17 | require("cinnamon").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/cinnamon-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./cinnamon-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.modules) mkRemovedOptionModule; 3 | in { 4 | imports = [ 5 | (mkRemovedOptionModule ["vim" "visuals" "enable"] '' 6 | As top-level toggles are being deprecated, you are encouraged to handle plugin 7 | toggles under individual options. 8 | '') 9 | 10 | ./cellular-automaton 11 | ./cinnamon-nvim 12 | ./fidget-nvim 13 | ./highlight-undo 14 | ./indent-blankline 15 | ./nvim-cursorline 16 | ./nvim-scrollbar 17 | ./nvim-web-devicons 18 | ./rainbow-delimiters 19 | ./tiny-devicons-auto-colors 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/fidget-nvim/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | 8 | cfg = config.vim.visuals.fidget-nvim; 9 | in { 10 | config = mkIf cfg.enable { 11 | vim.lazy.plugins.fidget-nvim = { 12 | package = "fidget-nvim"; 13 | setupModule = "fidget"; 14 | event = "LspAttach"; 15 | inherit (cfg) setupOpts; 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/plugins/visuals/fidget-nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./fidget.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/highlight-undo/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.highlight-undo; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["highlight-undo-nvim"]; 15 | 16 | pluginRC.highlight-undo = entryAnywhere '' 17 | require("highlight-undo").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/highlight-undo/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./highlight-undo.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/indent-blankline/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.indent-blankline; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["indent-blankline-nvim"]; 15 | 16 | pluginRC.indent-blankline = entryAnywhere '' 17 | require("ibl").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/indent-blankline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./indent-blankline.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-cursorline/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.nvim-cursorline; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["nvim-cursorline"]; 15 | 16 | pluginRC.nvim-cursorline = entryAnywhere '' 17 | require("nvim-cursorline").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-cursorline/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-cursorline.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-scrollbar/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.nvim-scrollbar; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["nvim-scrollbar"]; 15 | pluginRC.nvim-scrollbar = entryAnywhere '' 16 | require("scrollbar").setup(${toLuaObject cfg.setupOpts}) 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-scrollbar/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./scrollbar-nvim.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-scrollbar/scrollbar-nvim.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.modules) mkRenamedOptionModule; 3 | inherit (lib.options) mkOption mkEnableOption; 4 | inherit (lib.types) listOf str; 5 | inherit (lib.nvim.types) mkPluginSetupOption; 6 | in { 7 | imports = [ 8 | (mkRenamedOptionModule ["vim" "visuals" "scrollBar"] ["vim" "visuals" "nvim-scrollbar"]) 9 | ]; 10 | 11 | options.vim.visuals.nvim-scrollbar = { 12 | enable = mkEnableOption "extensible Neovim Scrollbar [nvim-scrollbar]"; 13 | setupOpts = mkPluginSetupOption "scrollbar-nvim" { 14 | excluded_filetypes = mkOption { 15 | type = listOf str; 16 | default = ["prompt" "TelescopePrompt" "noice" "NvimTree" "neo-tree" "alpha" "notify" "Navbuddy" "fastaction_popup"]; 17 | description = "Filetypes to hide the scrollbar on"; 18 | }; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-web-devicons/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.nvim-web-devicons; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["nvim-web-devicons"]; 15 | 16 | pluginRC.nvim-web-devicons = entryAnywhere '' 17 | require("nvim-web-devicons").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/nvim-web-devicons/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./nvim-web-devicons.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/rainbow-delimiters/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.dag) entryAnywhere; 8 | inherit (lib.nvim.lua) toLuaObject; 9 | cfg = config.vim.visuals.rainbow-delimiters; 10 | in { 11 | vim = mkIf cfg.enable { 12 | startPlugins = ["rainbow-delimiters-nvim"]; 13 | 14 | pluginRC.rainbow-delimiters = entryAnywhere '' 15 | vim.g.rainbow_delimiters = ${toLuaObject cfg.setupOpts} 16 | ''; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/plugins/visuals/rainbow-delimiters/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./rainbow-delimiters.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.options) mkEnableOption; 7 | inherit (lib.nvim.types) mkPluginSetupOption; 8 | in { 9 | options.vim.visuals.rainbow-delimiters = { 10 | enable = mkEnableOption "rainbow-delimiters"; 11 | setupOpts = mkPluginSetupOption "rainbow-delimiters" {}; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/plugins/visuals/tiny-devicons-auto-colors/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.modules) mkIf; 7 | inherit (lib.nvim.lua) toLuaObject; 8 | inherit (lib.nvim.dag) entryAnywhere; 9 | 10 | cfg = config.vim.visuals.tiny-devicons-auto-colors; 11 | in { 12 | config = mkIf cfg.enable { 13 | vim = { 14 | startPlugins = ["tiny-devicons-auto-colors-nvim" "nvim-web-devicons"]; 15 | 16 | pluginRC.tiny-devicons-auto-colors = entryAnywhere '' 17 | require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts}) 18 | ''; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /modules/plugins/visuals/tiny-devicons-auto-colors/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./tiny-devicons-auto-colors.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/wrapper/build/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./options.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/wrapper/build/options.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.types) package; 3 | inherit (lib.options) mkOption; 4 | in { 5 | options.vim.build = { 6 | finalPackage = mkOption { 7 | type = package; 8 | readOnly = true; 9 | description = "final output package"; 10 | }; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/wrapper/environment/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib.attrsets) attrValues; 7 | 8 | cfg = config.vim; 9 | in { 10 | config = { 11 | vim.startPlugins = map (x: x.package) (attrValues cfg.extraPlugins); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/wrapper/environment/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./options.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/wrapper/lazy/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./lazy.nix 4 | ./config.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/wrapper/rc/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./config.nix 4 | ./options.nix 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/wrapper/warnings/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib.options) mkOption literalExpression; 3 | inherit (lib.types) listOf str unspecified; 4 | in { 5 | options = { 6 | assertions = mkOption { 7 | type = listOf unspecified; 8 | internal = true; 9 | default = []; 10 | example = literalExpression '' 11 | [ 12 | { 13 | assertion = false; 14 | message = "you can't enable this for that reason"; 15 | } 16 | ] 17 | ''; 18 | }; 19 | 20 | warnings = mkOption { 21 | internal = true; 22 | default = []; 23 | type = listOf str; 24 | example = ["The `foo' service is deprecated and will go away soon!"]; 25 | description = '' 26 | This option allows modules to show warnings to users during 27 | the evaluation of the system configuration. 28 | ''; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /release.json: -------------------------------------------------------------------------------- 1 | { 2 | "release": "v0.8", 3 | "isReleaseBranch": false 4 | } 5 | --------------------------------------------------------------------------------