A modern neovim development environment, using nvim-lspconfig and nvim-treesitter, that can be spun up in a single command.
First, install Nix and enable Nix flakes. Then:
nix develop github:jamespwilliams/nde
vim configuration is very personal - everyone has their own preferences. I'd encourage you to fork this repo and add whatever customizations you'd like to your fork.
If you add your changes to extra-neovim-config.vim
, you should be able to
merge in changes from this repo fairly easily.
Currently, the following are provided (PRs welcome to add more):
Editor
- neovim
- nvim-lspconfig, plus configuration to use all of the Supported Language Servers listed below
- nvim-treesitter configuration for most languages (all those in nixpkgs'
pkgs.tree-sitter.allGrammars
) - bat.vim, my own Vim theme, which has extra rules for highlighting treesitter-parsed Go files
- vim-sensible, Tim Pope's set of sane defaults for Vim
Supported Languages
- Go (1.19.1) with gopls
- Rust (1.63.0) with rust-analyzer
- Python (3.10.6) with pyright
- Perl (5.36.0) with perl-language-server
- Typescript (4.8.3) with typescript-language-server
- Lua with lua-language-server
- Vimscript with vim-language-server
- Terraform with terraform-ls
For convenience, consider adding alias nde='nix develop github:jamespwilliams/nde'
to your .bashrc
or equivalent:
bash:
echo alias nde=\'nix develop github:jamespwilliams/nde\' >> ~/.bashrc
zsh:
echo alias nde=\'nix develop github:jamespwilliams/nde\' >> ~/.zshrc
fish:
echo alias nde=\'nix develop github:jamespwilliams/nde\' >> ~/.config/fish/config.fish
You can add nix develop github:jamespwilliams/nde
to the very end of your
.bashrc
(or equivalent), which will mean that you're always launched into the
environment when you start a new shell.
bash:
echo nix develop github:jamespwilliams/nde >> ~/.bashrc
zsh:
echo nix develop github:jamespwilliams/nde >> ~/.zshrc
fish:
echo nix develop github:jamespwilliams/nde >> ~/.config/fish/config.fish
There are quite a few other neovim IDE layers available:
This project differs from those in two main ways:
- this project is more minimal
- this is either a pro or a con, depending on your perspective
- this project uses Nix, which is reproducible and (arguably) cleaner
- this is also either a pro or a con, depending on your perspective!