If your problem is caused by a bug in neovim-flake then it should be reported on the neovim-flake issue tracker. Alongside bug reports, feature requests are also welcome over neovim-flake pull requests.
$ cachix use neovim-flake # Optional: it'll save you CPU resources and time $ nix run github:notashelf/neovim-flake
By default LSP support for Nix is enabled alongside all complementary Neovim plugins. By running nix run .
, which is the default package,
you will build Neovim with this config.
Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.
Maximal is the ultimate configuration that will enable basically everything. Keep in mind, however, that this will pull a lot of dependencies.
While you can configure neovim-flake yourself using the builder, here are a few default configurations you can use.
$ nix run github:notashelf/neovim-flake#tidal file.tidal
Utilizing vim-tidal and mitchmindtree’s fantastic tidalcycles.nix start playing with tidal cycles in a single command.
In your tidal file, type a cycle e.g. d1 $ s "drum"
and then press ctrl+enter. Super collider with superdirt, and a modified GHCI with tidal will start up and begin playing. Note, you need jack enabled on your system. If you are using pipewire, its as easy as setting services.pipewire.jack.enable = true
.
$ nix run github:notashelf/neovim-flake#nix test.nix
Enables all the of neovim plugins, with language support for specifically Nix. This lets you see what a fully configured neovim setup looks like without downloading a whole bunch of language servers and associated tools.
$ nix shell github:notashelf/neovim-flake#maximal test.nix
It is the same fully configured neovim as with the Nix config, but with every supported language enabled.
Running the maximal config will download a lot of packages as it is downloading language servers, formatters, and more.
Custom configuration is done with the neovimConfiguration
function. It takes in the configuration as a module. The output of the configuration function is an attrset.
{ options = "The options that were available to configure"; config = "The outputted configuration"; pkgs = "The package set used to evaluate the module"; neovim = "The built neovim package"; }
The following is an example of a barebones vim configuration with the default theme enabled.
{ inputs.neovim-flake.url = "github:jordanisaacs/neovim-flake"; outputs = {nixpkgs, neovim-flake, ...}: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; configModule = { # Add any custom options (and feel free to upstream them!) # options = ... config.vim.theme.enable = true; }; customNeovim = neovim-flake.lib.neovimConfiguration { modules = [configModule]; inherit pkgs; }; in { packages.${system}.neovim = customNeovim.neovim; }; }
The Home Manager module allows us to customize the different vim
options. To use it, we first add the input flake.
{ neovim-flake = { url = github:notashelf/neovim-flake; # you can override input nixpkgs inputs.nixpkgs.follows = "nixpkgs"; }; }
Followed by importing the HM module.
{ imports = [ neovim-flake.nixosModules.hm-module ]; }
Then we should be able to use the given module. E.g.
{ programs.neovim-flake = { enable = true; settings = { vim.viAlias = false; vim.vimAlias = true; vim.lsp = { enable = true; }; }; }; }
Language specific support combines some combination of language specific plugins, treesitter
support, nvim-lspconfig
langauge servers, and null-ls
integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have support beyond just treesitter
highlighting.
LSP Server: Choice between nil and rnix-lsp
Formatting: Choice between alejandra and nixpkgs-fmt
LSP Server: sqls
Formatting: Disabled LSP formatting, instead using sqlfluff
Linting: sqlfluff
Plugins: See here
LSP Server: typescript-language-server
Formatting: Disabled LSP formatting, instead using prettier
Linting: eslint
Plugins: See here
Plugins: See here
The following are the neovim plugins used within neovim-flake. Some plugins are explicitly enabled by the user, while others are enabled implicitly.
nvim-cmp a completion engine that utilizes sources
cargo.toml
sqls
LSP