A highly modular, extensible and distro-agnostic Neovim distribution for Nix/NixOS.
Go to file
NotAShelf 9cb7239085
languages/css: add formatter support via prettier/prettierd
2024-02-28 00:35:29 +03:00
.github CI: name doc artifacts after their respective packages 2024-01-16 14:33:04 +03:00
assets chore: clean up unused assets 2023-07-16 13:31:31 +03:00
docs docs: add entry for `vim.luaPackages` option 2024-02-17 18:14:15 -05:00
flake CI: build and publish exposed docker package 2023-10-23 18:40:32 +03:00
lib fix: throw error when converting unknown object to lua 2024-02-17 21:55:07 +01:00
modules languages/css: add formatter support via prettier/prettierd 2024-02-28 00:35:29 +03: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
LICENSE chore: update license year 2023-02-06 08:14:42 +03:00
configuration.nix languages/nim: assert on darwin systems 2024-02-10 16:08:42 +03:00
flake.lock Theme: add `rose-pine` 2024-02-13 13:00:34 -08:00
flake.nix Theme: add `rose-pine` 2024-02-13 13:00:34 -08:00
release.json docs: refactor 2023-12-09 22:03:58 +03:00

.github/README.md

neovim-flake Logo

❄️ neovim-flake

Latest release Last commit License Stars Issues Repo Size

A highly modular, configurable, extensible and easy to use Neovim configuration wrapper written in Nix. Designed for flexibility and ease of use, this flake allows you to easily configure your Neovim instance with a few lines of Nix code.


Get Started

Using nix CLI

If you would like to try out the configuration before even thinking about installing it, you can run the following command

nix run github:notashelf/neovim-flake

This will get you a feel for the base configuration and UI design. The flake exposes #nix as the default package, providing minimal language support and various utilities.You may also use #nix, #tidal or #maximal 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 tidal support, run:

nix run github:notashelf/neovim-flake#tidal

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 massive and will take a while to build. To get a feel for the configuration, use the default nix or tidal configurations. Should you choose to try out the maximal configuration, using the binary cache as described in the manual is strongly recommended.

Docker

As of version 0.5, an image for the nix output is published to Dockerhub and GitHub packages with each tagged release. If you do not have Nix installed on your system, you may run neovim within a container using your favorite tool. The following command will open the current directory in neovim with necessary tools bootstrapped.

docker run -v `pwd`:/home/neovim/demo --rm -it notashelf/neovim-flake:latest

The available registeres are ghcr.io and dockerhub for the time being. Adjust to your liking.

Documentation

See the neovim-flake Manual for detailed installation guides, configurations, available options, release notes and more.

If you want to dive right into trying neovim-flake you can get a fully featured configuration with nix language support by running:

nix run github:notashelf/neovim-flake

Please create an issue on the issue tracker if you find the documentation lacking or confusing. I also appreciate any contributions to the documentation.

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.

Philosophy

The philosophy behind this flake configuration is to create an easily configurable and reproducible Neovim environment. While it does sacrifice in size (which I know some users will find disagreeable), it offers a lot of flexibility and customizability in exchange for the large size of the flake inputs. The "KISS" (Keep it simple, stupid) principle has mostly been abandoned here, however, you can ultimately leverage the flexibility of this flake to declare a configuration that follows KISS principles, as it is very easy to bring your own plugins and configurations from non-nix. What this flake is meant to be does eventually fall into your hands. Whether you are a developer, writer, or live coder, you can quickly craft a config that suits every project's need. Think of it like a distribution of Neovim that you have full control over. A distribution that takes advantage of pinning vim plugins and third party dependencies (such as tree-sitter grammars, language servers, and more).

One should never get a broken config when setting options. If setting multiple options results in a broken Neovim, file an issue! Each plugin knows when another plugin which allows for smart configuration of keybindings and automatic setup of things like completion sources and languages.

FAQ

Q: Why is this flake so big?
A: I have sacrificed in size in order to provide a highly configurable and reproducible Neovim environment. A binary cache is provided to eleminate the need to build the flake from source, but it is still a large flake. If you do not need all the features, you can use the default nix output instead of the maximal output. This will reduce size by a lot, but you will lose some language specific features.

Q: Will you try to make this flake smaller?
A: Yes. As a matter of fact, I am actively working on making this flake smaller. Unfortunately the process of providing everything possible by itself makes the flake large. Best I can do is to optimize the flake as much as possible by selecting plugins that are small and fast. And the binary cache, so at least you don't have to build it from source.

Q: Will you use a plugin manager/language server installer?
A: No. If you feel the need to ask that question, then you have missed the whole point of using nix and ultimately this flake. The whole reason we use nix is to be able to handle EVERYTHING declaratively, well including the LSP and plugin installations.

Q: Can you add X?
A: Maybe. Open an issue using the appropriate template and I will consider it. I do not intend to add every plugin that is in existence, but I will consider it, should it offer something useful to the flake.

Credits

Contributors

Special 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 neovim-flake logo
  • @FrothyMarrow - For seeing mistakes that I could not

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.