This post goes over how to set up YouCompleteMe for Vim 8.
Problem
If you updated YouCompleteMe, you might get the error:
YouCompleteMe unavailable: requires Vim 9.1.0016+.
You have 2 solutions:
- Upgrade Vim to 9.1
- Use a YouCompleteMe version that supports Vim 8
Solution
I tried upgrading Vim with Homebrew:
brew install vim
But the install took forever (see Stack Overflow and Reddit) so I canceled it. I decided to downgrade YouCompleteMe to support an older Vim version.
First, I deleted the plugin:
rm -rf bundle/YouCompleteMe/
Then I cloned the repository:
cd bundle && git clone https://github.com/ycm-core/YouCompleteMe.git
Afterwards, I checked out the branch legacy-vim-8.2
:
cd YouCompleteMe && git checkout legacy-vim-8.2
I installed the submodules:
git submodule update --init --recursive
Finally, I built ycmd:
python3 install.py --all