Ver Fonte

Add CoC

Andrew Swistak há 2 anos atrás
pai
commit
d20bb785b0
4 ficheiros alterados com 17 adições e 0 exclusões
  1. 3 0
      .gitmodules
  2. 11 0
      bin/manage_dotfiles.sh
  3. 1 0
      vim/bundle/coc.nvim
  4. 2 0
      vimrc

+ 3 - 0
.gitmodules

@@ -174,3 +174,6 @@
 [submodule "vim/bundle/vim-blockle"]
 	path = vim/bundle/vim-blockle
 	url = github:jgdavey/vim-blockle
+[submodule "vim/bundle/coc.nvim"]
+	path = vim/bundle/coc.nvim
+	url = github:neoclide/coc.nvim

+ 11 - 0
bin/manage_dotfiles.sh

@@ -93,6 +93,13 @@ compile_ycm() {
   cd "$DIR"
 }
 
+install_coc() {
+  echo "Installing CoC Yarn dependencies"
+  cd "$DIR"/vim/bundle/coc.nvim
+  yarn
+  cd "$DIR"
+}
+
 compile_exctags() {
   brew install --HEAD universal-ctags/universal-ctags/universal-ctags
 }
@@ -101,6 +108,7 @@ case "$1" in
   -a|--all)
     install_dotfiles
     update_git_submodules
+    install_coc
     compile_ycm
     compile_exctags
     ;;
@@ -113,6 +121,9 @@ case "$1" in
   -y|--compile_ycm)
     compile_ycm
     ;;
+  -c|--install_coc)
+    install_coc
+    ;;
   -e|--compile_exctags)
     compile_exctags
     ;;

+ 1 - 0
vim/bundle/coc.nvim

@@ -0,0 +1 @@
+Subproject commit 3014125e4ab7d35e08bbcde946dca4812b84f105

+ 2 - 0
vimrc

@@ -505,9 +505,11 @@ map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans
 \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
 \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
 
+
 let g:rustfmt_autosave = 1
 let g:ycm_rust_src_path = $RUST_SRC_PATH
 let g:rust_src_path = $RUST_SRC_PATH
+let g:coc_global_extensions = ['coc-rust-analyzer']
 autocmd BufRead *.rs :setlocal tags=./rusty-tags.vi;/,$RUST_SRC_PATH/rusty-tags.vi
 autocmd BufWrite *.rs :silent! exec "!rusty-tags vi --quiet --start-dir=" . expand('%:p:h') . "&" <bar> redraw!