A highly modular, extensible and distro-agnostic Neovim configuration framework for Nix/NixOS.
Find a file
Ching Pei Yang 21fcace3ed
treewide: implement lazy loading via lz.n for selected plugins (#407)
* flake: add lz.n and lzn-auto-require

* lazy: init module

* lzn-auto-require: add init lua code

* wrapper: fix opt plugin format

* lib.binds: add lz.n variant of bind functions

* telescope: lazy load

* nvim-tree: lazy load

* dapui: lazy load

* trouble: lazy load

* toggleterm: lazy load

* cheatsheet: lazy load

* diffview: lazy load

* icon-picker: lazy load

* leap: lazy load

* fidget: lazy load

* docs: add section on lazy plugins

* lazy: support lazy.enable=false

* comment-nvim: lazy load

* surround-nvim: lazy load

* neo-tree: lazy load

* fixup! lazy: init module

* dap: appease the nix gods (fix statix lint)

* flake.lock: fix merge mistake

* doc: update release note

* fixup! doc: update release note

* neo-tree: fix duplicate neo-tree install

* lazy: use attrsOf for lazy.plugins

* treewide: update lazy.plugins syntax

* docs: update lazy.plugins syntax

* lazy: cleanup

* Update docs/manual/hacking/additional-plugins.md

Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>

* formatting nitpick

Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>

* typo tee hee :3

Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>

* typo tee hee :4

Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>

* flake: update lz.n

* lazy: update lz.n plugin spec

* lazy: allow lines in place of str for lua code

* copilot: lazy load

* cmp: lazy load

this moves cmp itself to lazy.plugins but other plugins that call cmp
are not yet lazy so cmp is technically not yet lazy

* luasnip: lazy load

* flake: add rtp.nvim

* cmp: actually lazy load source

* fixup! cmp: actually lazy load source

* format

* docs: fix broken link

* cmp-nvim-lsp: lazy load

* lazy: allow key mode of str type

* cmp: install sourcess via cmp.sourcePlugins

* Update docs/manual/hacking/additional-plugins.md

Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>

* lazy: refactor common var

* nvim-dap-ui: add setupOpts

* refactor: re-order plugin and lz.n configs

lazy: make lzn-auto-require togglable

* docs: update dag-entries

* trouble: remove redundant import

* lazy: remove unused module arg

* toggleterm: make lazygit keybind optional

* toggleterm: use toLuaObject for clarity

* surround: rework keymap config

* remove stale FIXME

* lsp: use cmp_nvim_lsp capabilities

* cmp: deduplicate attr key

* theme: ensure themes load before lazy plugins

* doc: update description of `theme` dag entry

* lsp: avoid loading cmp on startup

* doc: update configuration docs on custom plugins

* cmp: skip trigger_load if lazy disabled

* treesitter: remove redundant code

* lsp: mark hack as HACK

* comment: remove redundant plugin

* Squash merge v0.7 into feature/lzn

---------

Co-authored-by: raf <raf@notashelf.dev>
Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>
2024-11-04 16:50:50 +01:00
.github meta: add changelog reminder to the pull request template 2024-10-06 01:46:59 +03:00
docs treewide: implement lazy loading via lz.n for selected plugins (#407) 2024-11-04 16:50:50 +01:00
flake lib.neovimConfiguration: deprecated extraModules and configuration (#377) 2024-09-22 22:52:10 +03:00
lib treewide: implement lazy loading via lz.n for selected plugins (#407) 2024-11-04 16:50:50 +01:00
modules treewide: implement lazy loading via lz.n for selected plugins (#407) 2024-11-04 16:50:50 +01:00
patches fix(flutter-tools): bug where dart lsp is not found 2023-06-26 12:31:51 +02:00
.editorconfig CI: add more stict checking 2023-10-20 11:59:21 +03:00
.envrc dev: rebase on a less personalized neovim flake 2023-02-01 22:11:37 +03:00
.gitignore treewide: remove trailing whitespaces 2023-10-20 11:59:28 +03:00
configuration.nix languages/vala: init (#432) 2024-11-03 23:14:14 +01:00
flake.lock treewide: implement lazy loading via lz.n for selected plugins (#407) 2024-11-04 16:50:50 +01:00
flake.nix treewide: implement lazy loading via lz.n for selected plugins (#407) 2024-11-04 16:50:50 +01:00
LICENSE docs: clean up remaining mentions of neovim-flake 2024-04-27 16:04:09 +03:00
release.json meta: mark as release 2024-04-27 16:38:44 +03:00

nvf Logo

nvf

nvf is a highly modular, configurable, extensible and easy to use Neovim configuration in Nix. Designed for flexibility and ease of use, nvf allows you to easily configure your fully featured Neovim instance with a few lines of Nix.


Features

  • Reproducible: Your configuration will behave the same anywhere. No surprises, promise!
  • Portable: nvf depends solely on your Nix store, and nothing else. No more global binaries! Works on all platforms, without hassle.
  • Customizable: There are almost no defaults to annoy you. nvf is fully customizable through the Nix module system.
  • Well-documented: Documentation is priority. You will never face undocumented, obscure behaviour.
  • Idiomatic: nvf does things the right way - the codebase is, and will, remain maintainable for myself and any contributors.

Get Started

If you are not sold on the concepts of nvf, and would like to try out the default configuration before even thinking about installing it, you may run the following in order to take nvf out for a spin.

# Run the default package
nix run github:notashelf/nvf

This will get you a feel for the base configuration and UI design. Though, none of the configuration options are final as nvf is designed to be modular and configurable.

Tip

The flake exposes #nix as the default package, providing minimal language support and various utilities. You may also use the #nix or #maximal packages provided by the this flake to get try out different configurations.

It is as simple as changing the target output to get a different configuration. For example, to get a configuration with large language coverage, run:

# Run the maximal package
nix run github:notashelf/nvf#maximal

Similar instructions will apply for nix profile install. However, you are recommended to instead use the module system as described in the manual.

Note

The maximal configuration is quite large, and might take a while to build. To get a feel for the configuration, use the default nix configuration. Should you choose to try out the maximal configuration, using the binary cache as described in the manual is strongly recommended.

If you are convinced, proceed to the next section to view the installation instructions.

Documentation

The recommended way of installing nvf is using either the NixOS or the Home-Manager module, though it is completely possible and no less supported to install nvf as a standalone package, or a flake output.

See the rendered nvf manual for detailed and up-to-date installation guides, configurations, available options, release notes and more. Tips for installing userspace plugins is also contained in the documentation.

Tip

While using NixOS or Home-Manager modules, programs.nvf.enableManpages = true; will allow you to view option documentation from the comfort of your terminal via man 5 nvf. The more you know.

Please create an issue on the issue tracker if you find the documentation lacking or confusing. Any improvements to the documentation through pull requests are also welcome, and appreciated.

Help

You can create an issue on the issue tracker to ask questions or report bugs. I am not yet on spaces like matrix or IRC, so please use the issue tracker for now.

Contributing

I am always looking for new ways to help improve this flake. If you would like to contribute, please read the contributing guide before submitting a pull request. You can also create an issue on the issue tracker before submitting a pull request if you would like to discuss a feature or bug fix.

FAQ

Q: What platforms are supported?
A: nvf actively supports Linux and Darwin platforms using standalone Nix, NixOS or Home-Manager. Please take a look at the

Q: Can you add X?
A: Maybe! It is not one of our goals to support each and every Neovim plugin, however, I am always open to new modules and plugin setup additions to nvf. Use the appropriate issue template and I will consider a module addition. As mentioned before, PRs adding new features are also welcome.

Q: A plugin I need is not available in nvf. What to do?
A: nvf exposes several APIs for you to be able to add your own plugin configurations! Please see the documentation on how you may do this.

Q: Main branch is awfully silent, is the project dead?
A: No! Sometimes we branch out (e.g. v0.6) to avoid breaking userspace and work in a separate branch until we make sure the new additions are implemented in the most comfortable way possible for the end user. If you have not noticed any activity on the main branch, consider taking a look at the list of branches or the list of open pull requests. You may also consider testing those release branches to get access to new features ahead of time and better prepare to breaking changes.

Credits

Contributors

Special, heart-felt thanks to

  • @fufexan - For the transition to flake-parts
  • @FlafyDev - For getting the home-manager to work
  • @n3oney - For making custom keybinds finally possible
  • @horriblename - For actively implementing planned features and quality of life updates
  • @Yavko - For the amazing nvf logo
  • @FrothyMarrow - For seeing mistakes that I could not
  • @Diniamo - For actively submitting PRs, pull requests and overall assistence
  • @Gerg-l - For the modern Neovim wrapper, mnw and occasional code improvements

and everyone who has submitted issues or pull requests!

Inspiration

This configuration borrows from and is based on a few other configurations, including:

I am grateful for their previous work and inspiration, and I wholeheartedly recommend checking their work out.

License

Following the license of the original neovim-flake, nvf has been made available under the MIT License. However, all assets and documentation are published under the CC BY License.

Yes, this includes the logo work too. Stop taking artwork that is not yours!