This is my personalized config and plugins for Neovim.
Install Neovim from a package manager of your choice e.g. brew, apt, pacman etc.. For this config we need to have Neovim version 0.8 or higher.
On a Mac:
brew install neovim # For latest stable Neovim
brew install --HEAD neovim # For Neovim nightly version
If you would like to make sure Neovim only updates when you want it to than I recommend installing from source:
git clone https://github.com/neovim/neovim.git
cd neovim
make CMAKE_BUILD_TYPE=Release
sudo make install
Make sure to remove or move your current nvim
directory
git clone https://github.com/rgruyters/nvim.git ~/.config/nvim
Run nvim
and wait for the plugins to be installed
NOTE (You will notice treesitter pulling in a bunch of parsers the next time you open Neovim)
NOTE Checkout this file for some predefined keymaps: keymaps
Open nvim
and enter the following:
:checkhealth
You'll probably notice you don't have support for copy/paste also that python and node haven't been setup
So let's fix that
First we'll fix copy/paste
-
On Mac
pbcopy
should be builtin -
On Ubuntu
sudo apt install xsel # for X11 sudo apt install wl-clipboard # for wayland
Next we need to install Python support (node is optional)
-
Neovim python support
pip install pynvim
-
Neovim node support
npm i -g neovim
We will also need ripgrep
for Telescope to work:
-
Ripgrep
brew install ripgrep # for Mac sudo apt install ripgrep # for Ubuntu
NOTE make sure you have node installed, I recommend a node manager like fnm.
I recommend using the following repo to get a "Nerd Font" (Font that supports icons)
My setup is now build on kickstart.nvim as core setup.
All other changes are added to lua/custom
folder or in after/plugins
.
To install a LSP, open "Mason" and find the list of all available LSP plugins.
:Mason
and press i
on the Language Server you wish to install. The current setup will
automatically enable the LSP for the particular file type.
My setup uses some conform.nvim for formatting and nvim-lint for linting. It will install via mason
NOTE Some are already setup as examples, remove them if you want
Custom LSP settings can be added to lua/custom/extras/lang as an own language file.
The current setup uses two files for installing and implementing plugins:
- init - Kickstart.nvim, minimum of plugins to use
- custom - Any extra plugins that I want to use or test out
If you want to add more plugins, the best place is to add them in the custom plugin folder.
The following plugins are availabile in the current setup:
- Comment.nvim
- LuaSnip
- cmp-cmdline
- cmp-nvim-lsp
- cmp-path
- cmp_luasnip
- conform.nvim
- friendly-snippets
- gitsigns.nvim
- indent-blankline.nvim
- lazy
- lualine.nvim
- markdown-preview.nvim
- mason-lspconfig.nvim
- mason.nvim
- nvim-cmp
- nvim-lint
- nvim-lspconfig
- nvim-surround
- nvim-treesitter-context
- nvim-treesitter
- nvim-web-devicons
- plenary
- project.nvim
- rose pine
- telescope.nvim
- todo-comments.nvim
- undotree
- vim-fugitive
- vim-sleuth
Some plugins will have breaking changes at some point. Here are some links with more information:
- nvim-treesitter breaking changes
- comments breaking changes
- nvim-cmp breaking changes
- luasnip breaking changes
- null-ls breaking changes
- telescope breaking changes
- gitsigns breaking changes
- nvim-surround breaking changes
The computing scientist's main challenge is not to get confused by the complexities of his own making.
- Edsger W. Dijkstra