coc for vim

This commit is contained in:
Barak Michener 2019-05-21 18:29:35 -07:00
parent 072228591e
commit 31c9d70d42
5 changed files with 60 additions and 25 deletions

View file

@ -0,0 +1,8 @@
{
"dependencies": {
"coc-go": "^0.1.2",
"coc-json": "^1.0.17",
"coc-python": "^1.1.7",
"coc-snippets": "^2.0.10"
}
}

20
.vim/coc-settings.json Normal file
View file

@ -0,0 +1,20 @@
{
"suggest.timeout": 5000,
"suggest.enablePreview": true,
"diagnostic.displayByAle": true,
"python.linting.flake8Enabled": true,
"python.jediEnabled": true,
"python.autoComplete.addBrackets": false,
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cc", "cpp", "cuda", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": ".ccls-cache"
}
}
}
}
}

View file

@ -419,3 +419,4 @@ hi DONE guifg=green guibg=NONE ctermfg=green ctermbg=NONE
"
hi deniteMatchedChar guifg=#FFFFFF guibg=#5F87FF ctermfg=15 ctermbg=27
hi link NormalFloat PmenuSel

54
.vimrc
View file

@ -161,19 +161,20 @@ Plug 'derekwyatt/vim-scala', {'for': 'scala'}
Plug 'hwayne/tla.vim'
" Plugins that autocomplete
Plug 'Shougo/deoplete.nvim'
Plug 'zchee/deoplete-clang'
Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}}
Plug 'zchee/deoplete-jedi'
Plug 'davidhalter/jedi-vim'
Plug 'eagletmt/neco-ghc', {'for': 'haskell'}
Plug 'eagletmt/ghcmod-vim', {'for': 'haskell'}
Plug 'racer-rust/vim-racer', {'for': 'rust'}
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
"Plug 'Shougo/deoplete.nvim'
"Plug 'zchee/deoplete-clang'
"Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}}
"Plug 'zchee/deoplete-jedi'
"Plug 'davidhalter/jedi-vim'
"Plug 'eagletmt/neco-ghc', {'for': 'haskell'}
"Plug 'eagletmt/ghcmod-vim', {'for': 'haskell'}
"Plug 'racer-rust/vim-racer', {'for': 'rust'}
"Plug 'autozimu/LanguageClient-neovim', {
"\ 'branch': 'next',
"\ 'do': 'bash install.sh',
"\ }
"Plug 'ensime/ensime-vim', { 'do': ':UpdateRemotePlugins' }
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': './install.sh'}
" Plugins that do specific things
Plug 'Shougo/vimproc.vim'
@ -191,6 +192,10 @@ Plug 'ncm2/float-preview.nvim'
call plug#end()
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
"NeoBundle 'eclim'
"https://git.wincent.com/command-t.git
@ -247,17 +252,17 @@ setlocal cursorline
" ** PLUGIN CONFIGURATION **
"
" Change the source rank
call deoplete#custom#option('sources', {
\ 'python': ['LanguageClient', 'jedi'],
\})
call deoplete#custom#source('buffer', 'rank', 1)
let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-6.0/lib/clang'
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources = {}
let g:deoplete#sources.scala = ['buffer', 'tags', 'omni']
let g:deoplete#omni#input_patterns = {}
let g:deoplete#omni#input_patterns.scala = ['[^. *\t0-9]\.\w*',': [A-Z]\w', '[\[\t\( ][A-Za-z]\w*']
"call deoplete#custom#option('sources', {
"\ 'python': ['LanguageClient', 'jedi'],
"\})
"call deoplete#custom#source('buffer', 'rank', 1)
"let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so'
"let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-6.0/lib/clang'
"let g:deoplete#enable_at_startup = 1
"let g:deoplete#sources = {}
"let g:deoplete#sources.scala = ['buffer', 'tags', 'omni']
"let g:deoplete#omni#input_patterns = {}
"let g:deoplete#omni#input_patterns.scala = ['[^. *\t0-9]\.\w*',': [A-Z]\w', '[\[\t\( ][A-Za-z]\w*']
" * Vim general/Unknown
let python_highlight_all = 1
let g:Tb_MaxSize=0
@ -437,10 +442,9 @@ let g:go_fmt_command = "goimports"
"let g:go_auto_type_info = 1
let g:go_updatetime = 300
"let g:go_bin_path = "$HOME/.go/bin"
let g:go_def_mode = 'guru'
" ** STATUSLINE **
"
set laststatus=2
set statusline=%t "tail of the filename
"set statusline+=[%{&ff}] "file format

2
.zshrc
View file

@ -136,3 +136,5 @@ if [ -f '/home/barak/local/google-cloud-sdk/completion.zsh.inc' ]; then source '
if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)
fi
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"