8.6 KiB
Getting Started
Table of Contents
Install
This is what you will have installed by the end of this section:
- Git 2.23+
- Neovim 0.5.0 (Neovim 0.4 currently not supported, see projects)
- Lua 5.1+
- ripgrep 11.0+
- GNU Find
- (Optional) fd 7.3.0+ (known as
fd-find
on Debian, Ubuntu & derivates), improves performance for many file indexing commands - (Optional) node & npm, required to use LanguageServerProtocols (LSP).
These packages ought to be available through the package managers of your OS; i.e. pacman/aptitude/rpm/etc on the various Linux distributions.
Neovim & dependencies
On Linux
Since Neovim 0.5 is a night version, it does not come packaged in the repositories of your distribution, so you have several options to install it.
-
Using the Doom Nvim install script to download a Neovim Nightly AppImage from releases (see how by executing the installer with bash -s -- -h).
-
Using extra repositories according to your distribution (PPA/COPR/AUR/etc).
Ubuntu
You can get nightly builds of git master from the Neovim Unstable PPA.
add-apt-repository ppa:neovim-ppa/unstable
apt-get update
Fedora
You can get nightly builds of git master from the Agriffis's Copr.
dnf copr enable agriffis/neovim-nightly
dnf install -y neovim python{2,3}-neovim
Arch
Neovim Nightly builds can be installed using the PKGBUILD
neovim-nightly-bin
,
available on the AUR.
On MacOS
Neovim nightly can be installed with homebrew with the following command.
brew install --HEAD neovim
If you already have Neovim v4 installed you may need to unlink it.
brew unlink neovim
brew install neovim --HEAD
nvim --version
MacPorts currently only has Neovim v4.4
You can also download a prebuilt binary from the Neovim releases page.
- Download nvim-macos.tar.gz
- Extract: tar xzvf nvim-macos.tar.gz
- Run ./nvim-osx64/bin/nvim
On Windows
If you use Windows, please put the steps to install Neovim Nightly here!
External dependencies
On Linux
Ubuntu
# Required dependencies
apt-get install git lua ripgrep
# (Optional) Improves performance for many file indexing commands
apt-get install fd-find
# (Optional) Required by LanguageServerProtocols
apt-get install nodejs npm
Fedora
# Required dependencies
dnf install git lua ripgrep
# (Optional) Improves performance for many file indexing commands
apt-get install fd-find # is 'fd' in Fedora <28
# (Optional) Required by LanguageServerProtocols
dnf install nodejs
Arch
# Required dependencies
pacman -S git lua ripgrep
# (Optional) Improves performance for many file indexing commands
pacman -S fd
# (Optional) Required by LanguageServerProtocols
pacman -S nodejs npm
On MacOS
If you use MacOS, please help by posting the steps to install the external dependencies here!
On Windows
If you use Windows, please help by posting the steps to install the external dependencies here!
Doom Nvim
With Neovim Nightly and Doom's dependencies installed, next is to install Doom Nvim itself:
NOTES:
- If you have not installed Neovim Nightly yet, please run the following command before installing Doom Nvim, it will install Neovim nightly and Doom Nvim.
- If you want to know all the commands of the installer, run the installer with bash -s -- -h instead of just bash.
# Check if you have all the dependencies listed above
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash -s -- -c
# If you do not have Neovim nightly but you have all the dependencies listed above
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash -s -- -n
# If you already have Neovim nightly and all the dependencies listed above
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash
The installation script will set up everything for you and will work you through the first-time setup of Doom Nvim.
Update & Rollback
Update Doom Nvim
To update Doom Nvim, you have two options, run :DoomUpdate
inside Neovim or
run the installation script with bash -s -- -u.
Rollback
To uninstall Doom Nvim and go back to your previous setup, simply run the installation script with bash -s -- -x. It will uninstall Doom Nvim and restore the backup of your previous setup.
Configuration
You can configure Doom Nvim by tweaking the file doomrc
in your Doom Nvim root
dir ($HOME/.config/doom-nvim/
by default), please see
:h doom_nvim for more information.
Modules
Doom Nvim consists of around 7 modules and growing. A Doom Nvim Module is a bundle of plugins,
configuration and commands, organized into a unit that can be toggled easily by
tweaking your doomrc (found in $HOME/.config/doom-nvim
).
Please see Package Management for more information.
IMPORTANT: any changes to your Doom Nvim Modules won't take effect until you run
:PackerSync
inside Neovim.
Package Management
Doom Nvim does not use Vim-Plug in the Neovim Nightly version. Instead, it uses a declarative and use-package inspired package manager called packer.nvim.
Modules and plugins are declared in lua/plugins.lua
file, located in your doom nvim root dir.
Read on to learn how to use this system to install your own plugins.
WARNING: Do not install plugins directly in
lua/plugins.lua
. Instead, use yourdoomrc
to modify them.
Installing plugins
To install a custom package, add it to g:doom_custom_plugins
variable into your
doomrc
.
" @default = []
let g:doom_custom_plugins = ['plugin_author/plugin_repo']
NOTES:
- Do not forget to run
:PackerInstall
to install your new plugins.
Disabling plugins
To disable plugins from Doom Nvim Modules or disable a module itself, just use the
g:doom_disabled_plugins
and/or g:doom_disabled_modules
.
" @default = []
let g:doom_disabled_plugins = ['terminal', 'treesitter']
" @default = ['git', 'lsp', 'web']
let g:doom_disabled_modules = ['web']
NOTES:
Do not forget to run
:PackerSync
or your changes won't take effect.You can see a list of the plugins that you can disable on Modules.
Configuring Doom
Configuring settings
You can change Doom's default settings by tweaking your doomrc
, please see
:h doom_nvim to know how to.
Configuring plugins
Do you want to change some configurations of some modules?
Go to lua/configs
dir and you will find the configurations for the Lua plugins,
or go to config/plugins
dir to change the Vimscript plugins configurations.
Configuring LSP
To easily install LSPs and without having to do it system-wide or having to manually configure servers, Doom Nvim makes use of kabouzeid/nvim-lspinstall. You can see a list of currently supported languages at bundled installers.
Usage example:
:LspInstall python
to install Python LSP:LspUninstall python
to uninstall Python LSP
Binding keys
You can set your own keybindings by modifying the config/keybindings.vim
,
config/plugins/leader-mapper.vim
and lua/configs
files.