This repository contains my personal neovim configuration I use on a daily basis. It is based off nvim-basic-ide and customised to my needs.
All the included plugins are pinned to a version that ensures they are compatible and will not update potentially introducing errors into your config.
You can install Neovim with your package manager e.g. brew, apt, dnf, pacman etc.. but remember that when you update your packages Neovim may be upgraded to a newer version.
If you would like to make sure Neovim only updates when you want it to than I recommend installing from source:
NOTE Verify the required build prerequisites for your system.
git clone https://github.com/neovim/neovim.git
cd neovim
git checkout release-0.9
make CMAKE_BUILD_TYPE=Release
sudo make install
For some things to work, you need a recent version of node
. You can normally install it using your package manager.
On Ubuntu, however, the version will not be recent enough. You can update it using npm
:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Clone this repository to the ~/.config/nvim
directory. Make sure to save or backup your old configuration beforehand.
git clone https://github.com/mosmuell/nvim_config.git ~/.config/nvim
Then, 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. Here's how to fix that:
-
On mac
pbcopy
should be builtin -
On Debian-base distros
sudo apt install xsel # for X11 sudo apt install wl-clipboard # for wayland
-
On Fedora
sudo dnf install xsel # for X11 sudo dnf install wl-clipboard # for wayland
Next we need to install python support (node is optional):
-
Neovim
python
supportsudo apt install python3-pynvim # on Debian sudo dnf install python3-pynvim # on Fedora
-
Neovim
node
supportnpm i -g neovim
We will also need ripgrep
for Telescope to work:
-
Ripgrep
sudo apt install ripgrep # on Debian sudo dnf install ripgrep # on Fedora
I recommend using the following repo to get a "Nerd Font" (Font that supports icons)
To add a new LSP
First Enter:
:Mason
and press i
on the Language Server you wish to install
Next you will need to add the server to this list: servers Note: Builtin LSP doesn't contain all lsps from nvim-lspconfig.
If you want to install any from there, for example terraform_lsp(which adds more functionality than terraformls, like complete resource listing), you can either
- add the lsp name in mason lsp block
-- lua/utils/init.lua
M.servers = {
"lua_ls",
"cssls",
"html",
"tsserver",
"pyright",
"bashls",
"jsonls",
"yamlls",
}
- or manually install the binary of the lsp and put it in your path by downloading the binary or through your package manager.
Make sure the formatter or linter is installed and add it to this setup function: null-ls
NOTE Some are already setup as examples, remove them if you want
- alpha-nvim
- bufdelete.nvim
- bufferline.nvim
- cmp-buffer
- cmp-cmdline
- cmp-nvim-lsp
- cmp-nvim-lua
- cmp-path
- cmp_luasnip
- Comment.nvim
- darkplus.nvim
- friendly-snippets
- gitsigns.nvim
- indent-blankline.nvim
- lazy.nvim
- lualine.nvim
- LuaSnip
- mason.nvim
- mason-lspconfig.nvim
- mason-null-ls.nvim
- mason-nvim-dap.nvim
- neodev.nvim
- neorepl.nvim
- none-ls.nvim
- nvim-autopairs
- nvim-cmp
- nvim-dap-ui
- nvim-dap
- nvim-lspconfig
- nvim-tree.lua
- nvim-treesitter
- nvim-ts-context-commentstring
- nvim-web-devicons
- plenary.nvim
- project.nvim
- telescope.nvim
- tmux.nvim
- toggleterm.nvim
- tokyonight.nvim
- vim-illuminate
- which-key.nvim