/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Use homebrew
brew install node@10
On ubuntu:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
~/.bash_profile
# npm global reset to user directoy
if [ -d ~/.npm-global ]; then
export PATH=$PATH:~/.npm-global/bin
# export NPM_CONFIG_PREFIX=~/.npm-global
else
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
npm i -g npm
source ~/.bash_profile
fi
if [ -d /usr/local/opt/node@10/bin ]; then
PATH=$PATH:/usr/local/opt/node@10/bin
fi
Or install use nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
nvm ls-remote
nvm install v10.15.0
neovim coc.nvim and vim-go
brew install neovim
brew install python3
pip3 list |awk 'NR>2 {print "pip3 install --upgrade --user "$1}'|bash -
pip3 install neovim
brew install node@10
git clone https://github.com/bantana/nvimcoc
nvim +"CocInstall coc-vetur coc-snippets coc-stylelint coc-css coc-prettier coc-yaml coc-tslint coc-html coc-tsserver coc-eslint coc-emmet coc-json"
nvim +GoInstallBinaries main.go
ultisnips directoy:
cd ~/.config/coc && git clone https://github.com/bantana/ultisnips.git ultisnips
install go-langserver
go get -u -v github.com/sourcegraph/go-langserver
vi ~/.config/nvim/coc-settings.json
"languageserver": {
"golang": {
"command": "go-langserver",
"filetypes": ["go"],
"initializationOptions": {
"gocodeCompletionEnabled": true,
"diagnosticsEnabled": true,
"lintTool": "golint"
}
}
}
yarn global add bash-language-server
vi ~/.config/nvim/coc-settings.json
"languageserver": {
"bash": {
"command": "bash-language-server",
"args": ["start"],
"filetypes": ["sh"],
"ignoredRootPaths": ["~"]
}
}
install dart sdk
brew tap dart-lang/dart
brew install dart
brew upgrade dart
install dart_language_server
pub global activate dart_language_server
vi ~/.config/nvim/coc-settings.json
"languageserver": {
"dart": {
"command": "dart_language_server",
"args": [],
"filetypes": ["dart"],
"initializationOptions": {},
"settings": {
"dart": {
"validation": {},
"completion": {}
}
}
},
}
install dockerfile-language-server-nodejs
yarn global add dockerfile-language-server-nodejs
~/.config/nvim/coc-settings.json
"languageserver": {
"dockerfile": {
"command": "docker-langserver",
"filetypes": ["dockerfile"],
"args": ["--stdio"]
}
}
yarn global add javascript-typescript-langserver
brew tap twlz0ne/homebrew-ccls
brew install ccls
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp", "objc", "objcpp"],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cacheDirectory": "/tmp/ccls"
}
},
latex support
~/.config/nvim/init.nvim
Plug 'lervag/vimtex', {'for': ['tex', 'plaintex', 'bst']}
brew cask install mactex skim
if [[ -d /usr/local/texlive/2018/bin/x86_64-darwin ]]; then
#statements
export PATH=$PATH:/usr/local/texlive/2018/bin/x86_64-darwin
fi
" vimtex {{{
" require: brew cask install mactex skim
let g:tex_flavor='latex'
let g:vimtex_view_method='skim'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'
let g:Tex_CompileRule_pdf='xelatex -interaction=nonstopmode $*'
let g:vimtex_compiler_enabled=1
let g:vimtex_view_general_options
\ = '-reuse-instance -forward-search @tex @line @pdf'
let g:vimtex_view_general_options_latexmk = '-reuse-instance'
" TOC settings
let g:vimtex_toc_config = {
\ 'name' : 'TOC',
\ 'layers' : ['content', 'todo', 'include'],
\ 'resize' : 1,
\ 'split_width' : 50,
\ 'todo_sorted' : 0,
\ 'show_help' : 1,
\ 'show_numbers' : 1,
\ 'mode' : 2,
\}
"
" }}}
vim command:
:vimtexCompile
plugin:
Plug 'floobits/floobits-neovim'
visit floobits.com to register a account.
https://github.com/universal-ctags/ctags
Install:
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
install rust:
curl https://sh.rustup.rs -sSf | sh
# rust bin
if [[ -f "$HOME/.cargo/env" ]]; then
source "\$HOME/.cargo/env"
fi
# Bash (macOS/Homebrew)
# $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion
[https://github.com/rust-lang/rls](see https://github.com/rust-lang/rls)
rustup update
rustup component add rls rust-analysis rust-src