This is a Nix flake configuration for Neovim built with the Nixvim project It is fully configured with LSPs, linters, formatters, debuggers, styling, and popular navigation plugins.
This flake can be built with the Nix package manager or with a NixOS system configured with flake support. Follow these instructions to download and install the Nix package manager for your system.
Once you have the package manager installed, enable flak support by adding the following line to ~/.config/nix/nix.conf or /etc/nix/nix.conf:
experimental-features = nix-command flakes
You will need to restart your shell or terminal session for the setting to take effect.
To use Neovim from the dev-shell, clone this repo with:
git clone https://github.com/pete3n/nixvim-flake.git
cd to the repo and enter the dev-shell environment with:
nix develop
or run it directly from Github with:
nix develop github:pete3n/nixvim-flake
You can create a persistent profile link for the development environment with:
nix develop --profile ./nixvim
"nixvim" is an arbitrary name. Use whatever name you like. This will create a symlink to the Nix store environment derivation. You can re-open the profile with:
nix develop ./nixvim
- Theme is Tokyo Night with noice UI from @folke
- lualine with onedark theme
Language | LSP | Lint | Format | Debug |
---|---|---|---|---|
ASM | ✔ | ✔ | ✔* | |
C | ✔ | ✔ | ✔ | ✔* |
Cmake | ✔ | ✔ | ||
C++ | ✔ | ✔ | ✔ | ✔* |
CSS | ✔ | ✔ | ✔ | |
Go | ✔ | ✔ | ✔ | ✔ |
HTML | ✔ | ✔ | ✔ | |
Lua | ✔ | ✔ | ✔ | |
JSON | ✔ | ✔ | ✔ | |
Markdown | ✔ | ✔ | ✔ | |
Nix | ✔ | ✔ | ✔ | |
Prisma | ✔ | ✔ | ||
Python | ✔ | ✔ | ✔ | ✔ |
Rust | ✔ | ✔ | ✔ | ✔ |
Shell | ✔ | ✔ | ✔ | ✔* |
TypeScript | ✔ | ✔ | ✔ | |
YAML | ✔ | ✔ | ✔ | |
Zig | ✔ | ✔ | ✔ |
*Debugging is with a GDB/LLDB/BASHDB wrapper through nvim-gdb I have been unable to get DAP working correctly for these languages.
- cmp-buffer - nvim-cmp source for buffer words
- cmp-cmdline - nvim-cmp source for cmdline
- cmp-nvim-lsp - nvim-cmp source for LSP client
- cmp-nvim-lua - nvim-cmp source for lua
- cmp-path - nvim-cmp source for path
- conform - Formatter plugin
- fugitive - Git wrapper
- gitsigns - Git integration for buffers
- harpoon - Fast file/buffer switching
- lualine - Statusline
- luasnip - Snippet engine
- noice - Experimental messaging, cmdline, and popupmenu UI
- nvim-cmp - Code completion
- nvim-dap-go - go configuration extension for DAP
- nvim-dap-python - python configuration extension for DAP
- nvim-dap-ui - nvim-dap UI
- nvim-dap-virtual-text - debugger virtual text
- nvim-dap - Debug adapter protocol client
- nvim-gdb - Wrapper for GDB, LLDB, BashDB, and PDB/PDB+
- nvim-lint - Async linter plugin
- nvim-lspconfig - Language Server Protocol config tool
- nvim-notify - Notification manager
- nvim-tree - File explorer sidebar
- nvim-ufo - Ultra Fold in Neovim
- oil - File explorer
- telescope - Fuzzyfinder
- treesitter-textobjects - Syntax aware text-objects
- treesitter - Parsing system interface
- typescript-tools-nvim - lua Typescript LS replacement
- undotree - Undo history visualizer
Much of the configuration for this flake was gleaned from numerous instructional videos and howto guides for Neovim including:
- Keymaps and Harpoon configuration from ThePrimeagen's video
- LSP setup guide with TJ DeVries and Bashbunni
- Linting and Formatting from Josean Martinez
- Telescope and Treesitter setup again with TJ DeVries
- In-depth Treesitter configuration with Josean Martinez
- Completions with nvim-cmp from TJ again
- Debugging with DAP with TJ and Bashbunni
Big shout out to the Nix and Neovim community for all the awesome plugins, documentation, videos, and support. There are too many people to thank, but for this project in particular, I'd like to thank @vimjoyer for piquing my interest in Nixvim with his video and @GaetanLepage for maintaining the Nixvim project.