Install Neovim
Created: | Updated:
Install
Install Neovim on linux as an appimage in the recommended directory
~/.local/bin/
(Ubuntu / Debian), or in ~/bin/
(OpenSUSE).
cd ~/.local/bin/
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage
This should install and open Neovim. Then run a health check. You may need to install additional dependencies, like build-essential or equivalent.
:checkhealth
Update shell aliases.
alias nvim='/home/[USERNAME]/.local/bin/nvim.appimage'
# .local/bin is often added to $PATH, so
alias nvim='nvim.appimage'
alias vi='nvim'
Create config file.
touch ~/.config/nvim/init.vim
# or symlink it if you have one
ln -s ~/.dotfiles/nvim ~/.config/nvim
Separate config if nvim is embedded in VSCode.
if exists('g:vscode')
" vscode-neovim config
finish
endif
" neovim config
Using with VSCode.
-
Install VSCode Neovim plugin
-
Update settings
{
"vscode-neovim.neovimExecutablePaths.linux": "/home/[USERNAME]/.local/bin/nvim.appimage",
"editor.cursorBlinking": "solid",
"keyboard.dispatch": "keyCode" // if CapsLock changed to Esc
}
-
Optional: add which-key plugin
-
Optional: add keybindings
Customize
Make CapsLock an additional Esc.
May need some build libs for tree-sitter to compile (for Ubuntu / Debian).
sudo apt install build-essential
Install plugin manager Plug.
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
Then open Neovim $ nvim
and install plugins.
:PlugIstall
Prerequisites: NodeJS and NPM to use LSP, install with FNM, for faster shell startup, or with NVM
Install LSP servers
# javascript & typescript (.js & .ts)
npm i -g typescript typescript-language-server
# css & html & json
npm i -g vscode-langservers-extracted
# svelte
npm i -g svelte-language-server
# vim
npm i -g vim-language-server
# emmet
npm i -g emmet-ls
# all
npm i -g typescript typescript-language-server vscode-langservers-extracted svelte-language-server vim-language-server emmet-ls
Install utils for TypeScript server development (NodeJS).
npm i -g ts-node @swc/core @swc/helpers
Install nodemon, for automatically restart your server.
npm install -g nodemon
Install prettierd, for instant formatting.
npm install -g @fsouza/prettierd
Install ripgrep & fd for faster search with Telescope.
sudo apt install ripgrep fd-find
Clipboard copy/paste support.
sudo apt install xsel
All deps for Ubuntu / Debian
sudo apt install build-essential xsel ripgrep fd-find
Recommended terminal: kitty
Here my nvim config