A highly configurable nix flake for neovim
Originally based on Wil Taylor's amazing neovim-flake
While I am working towards this config being more stable so people can point to it directly, its origins are as an opinionated personal config. Thus, I recommend cloning the config and running it locally with:
nix run .
If you want to live life on the edge you can run from this repository directly with:
nix run github:jordanisaacs/neovim-flake
The philosophy behind this flake configuration is to allow for easily configurable and reproducible neovim environments. Enter a directory and have a ready to go neovim configuration that is the same on every machine. Whether you are a developer, writer, or live coder (see tidal cycles below!), quickly craft a config that suits every project's need. Think of it like a distribution of Neovim that takes advantage of pinning vim plugins and third party dependencies (such as tree-sitter grammars, language servers, and more).
As a result, 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.
nix run github:jordanisaacs/neovim-flake#tidal file.tidal
Utilizing vim-tidal and mitchmindtree's fantastic tidalcycles.nix start playing with tidal cycles in a single command. Type on the first line of your tidal file, 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
.
Most languages use nvim-lspconfig to set up language server. Additionally some languages also (or exclusively) use null-ls to extend capabilities.
LSP Server: rust-analyzer
Formatting
Rust analyzer provides builtin formatting with rustfmt
Plugins
LSP Server: nil
Formatting
nil provides builtin formatting with nixpkgs-fmt but it is disabled and I am instead using null-ls with alejandra
LSP Server: sqls
Formatting
sqls provides formatting but it does not work very well so it is disabled. Instead using sqlfluff through null-ls.
Linting
Using sqlfluff through null-ls to provide linting diagnostics set at information
severity.
Plugins
- sqls.nvim for useful actions that leverage
sqls
LSP
LSP Server: ccls
LSP Server: typescript-language-server
Linting
Using eslint through null-ls.
Formatting
Disabled lsp server formatting, using prettier through null-ls.
LSP Server: pyright
Formatting:
Using black through null-ls
Plugins
Plugins
- nvim-ts-autotag for autoclosing and renaming html tags. Works with html, tsx, vue, svelte, and php
A list of all plugins that can be enabled
- nvim-lspconfig common configurations for built-in language server
- null-ls.nvim neovim as a language server to inject LSP diagnostics, code actions, etc.
- lspsaga.nvim useful UI and tools for lsp
- trouble.nvim pretty list of lsp data
- nvim-code-action-menu a better code action menu with diff support
- lsp-signature show function signatures as you type
- lspkind-nvim for pictograms in lsp (with support for nvim-cmp)
- nvim-bufferline-lua a buffer line with tab integration
- bufdelete-nvim delete buffers without losing window layout
- lualine.nvim statusline written in lua.
- nvim-tree-lua a file explorer tree written in lua. Using
- gitsigns.nvim a variety of git decorations
- Nix installation of treesitter
- nvim-treesitter-context a context bar using tree-sitter
- nvim-ts-autotag uses treesitter to autoclose/rename html tags
- indent-blankline for indentation guides
- nvim-web-devicons Plugins and colors for icons. Requires patched font
- telescope an extendable fuzzy finder of lists. Working ripgrep and fd
- which-key a popup that displays possible keybindings of command being typed
- glow.nvim a markdown preview directly in neovim using glow
- nvim-compe A deprecated autocomplete plugin
- nvim-cmp a completion engine that utilizes sources (replaces nvim-compe)
- cmp-buffer a source for buffer words
- cmp-nvim-lsp a source for builtin LSP client
- cmp-vsnip a source for vim-vsnip autocomplete
- cmp-path a source for path autocomplete
- cmp-treesitter treesitter nodes autcomplete
- crates.nvim autocompletion of rust crate versions in
cargo.toml
- vim-vsnip a snippet plugin that supports LSP/VSCode's snippet format
- nvim-autopairs an autopair plugin for neovim
- onedark a dark colorscheme with multiple options
- tokyonight-nvim a neovim theme with multiple color options
- plenary which is a dependency of some plugins, installed automatically if needed