- Install YCM via vim-plug (
:PlugInstall
in.vimrc
). - Install CMake, MacVim and Python 3; Note that the pre-installed macOS system vim is not supported (due to it having broken Python integration).
brew install cmake python go nodejs
- Install MacVim
brew install macvim
- Compile YCM
cd ~/.vim/plugged/YouCompleteMe
python3 install.py --all
- Enable TSServer by deleting the
third_party/ycmd/third_party/tern_runtime/node_modules
directory in the YCM folder under~/.vim/plugged/
. Runinstall.py --js-completer
at the root of the YCM folder.
Note: To enable diagnostics in a JS/TS project, ensure that jsconfig.json
or tsconfig.json
exists at the root of the project with the following content:
{
"compilerOptions": {
"checkJs": true
}
}