# Neovim
### Requirements
1. [nvim-dap](https://github.com/mfussenegger/nvim-dap)
2. [lldb-vscode](https://lldb.llvm.org/) (Comes with an installation of lldb)
3. [plenary.nvim](https://github.com/nvim-lua/plenary.nvim)
### Install (or upgrade) with [[Homebrew]]
This does not automatically include Python support: `YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support`. Confirmed for both [[Ubuntu]] and [[macOS]].
```bash
brew install neovim
```
If you get `YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support.` at start, you're missing `pynvim`:
```bash
python3 -m pip install --user --upgrade pynvim
```
See [this Stack Overflow answer](https://stackoverflow.com/a/61831305) for details.
### [Install on Ubuntu](https://github.com/neovim/neovim/wiki/Installing-Neovim#ubuntu)
- Homebrew install does not automatically include Python support
```bash
# Install neovim
sudo apt install -y neovim
# Python support should already be installed, but if missing, try:
sudo apt install -y python3-neovim
sudo apt install -y python-neovim # Unable to locate package python-neovim
```
## Help Commands
`:help` to see main help file, which links to all the other help files
`:help options` to see config options (i.e. vimrc)
`:help nvim-features` to see Neovim features
`:help quickref` is a handy cheatsheet.
`:checkhealth` to see config correctness
`:help key-notation` to see key notations
```bash
set vnoremap √ <C-V>
set vnoremap √ <C-v>
```
## Useful Commands
- See loaded scripts: `:scriptnames`
- Useful for debugging
## Notes
### [`sudo nvim` doesn't load `init.vim`](https://unix.stackexchange.com/a/525478)
Use `sudoedit` instead:
```bash
sudoedit <file>
```
`sudoedit` uses the editor specified with the `EDITOR` environment variable, which should already be configured to vim/nvim
### `.vimrc` equivalent stored at `.config/nvim/init.vim`
### Plugins stored at `~/.config/nvim/plugged`
- [[vim-plug]] is at `~/.local/share/nvim/site/autoload`