Author: Kit Pearson
Assuming you have no current VIM setup. Clone this repo to user root of your system and run:
chmod 755 ~/.vim/setup && ~/.vim/setup`- Dropping support for Vim. Neovim only.
- Dropping support for the youcompleteme plugin in lue of COC (Conquer of Completion)
Install [Neovim] via Homebrew brew install neovim/neovim/neovim.
The next couple steps are included in the setup.sh script.
Symlink this project directory to the new Neovim locations.
mkdir -p "$HOME"/.config
ln -s "$HOME"/.vim "$HOME"/.config/nvimItalic fonts in Neovim need a little help.
-
Create a file called
256color-italic.terminfowith the following contents:xterm-256color-italic|xterm with 256 colors and italic, sitm=\E[3m, ritm=\E[23m, use=xterm-256color,
-
Then from the same directory as the new file run:
tic xterm-256color-italic.terminfo
-
In the
bashrcorzshrcadd:export TERM=xterm-256color-italic -
Finally add to the neovim's
~/.config/init/or symlinked~/.vimrcset termguicolors -
If your using iTerm ensure "Italic text allowed" is enabled.
Conquer of Completion requires nodejs >= 8.10.0
TODO: Not currently working
The lightline plugin expects the "PowerlineSymbols-Powerline" font to be available. Download PowerlineSymbols and install into OSX Font Book.
Vim-plug is used to manage plugins.
Vim-plug is automatically downloaded the first time NVIM is run if it is not
present in the autoload directory. If that happens Pluginstall will also
run automatically. Find all logic related to this in config/plugins.vim
Run :PlugStatus from inside VIM for more info.
Reactjs Vim Setup
Use mxw's Vim JSX highlighting.
Plugin 'mxw/vim-jsx'To get syntax highlighting in a .js file add this to your Using JSX syntax in .js files requires an additional config.
let g:jsx_ext_required = 0 " Allow JSX in normal JS filesI'm using Syntastic, which requires a little setup out side the scope of
the .vimrc.
Install eslint, babel-eslint (for ES6 support), and eslint-plugin-react:
npm install -g eslint
npm install -g babel-eslint
npm install -g eslint-plugin-reactCreate a config like this in your project's .eslintrc, or do so globally by
placing it in ~/.eslintrc:
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"settings": {
"ecmascript": 6,
"jsx": true
},
"plugins": ["react"],
"rules": {
"semi": "error",
"strict": 0,
"quotes": 0,
"no-unused-vars": 0,
"camelcase": 0,
"no-underscore-dangle": 0
}
}Finally, configure Syntastic to use ESLint in your .vimrc.
let g:syntastic_javascript_checkers = ['eslint']You should be good to go, and JSX with ES6 features will syntax check correctly!
https://yeripratama.com/blog/customizing-coc-explorer/ https://yeripratama.com/blog/customizing-vim-lightline/
Coc configure yaml schema ref: https://www.schemastore.org/json/
:verbose set smartindent? = ~/.vim/plugged/vim-javascript/indent/javascript.vim line 15 autoindent? = /usr/local/Cellar/neovim/0.4.4/share/nvim/runtime/indent/xml.vim line 38 indentexpr? = ~/.vim/plugged/vim-jsx/after/indent/jsx.vim line 22