From 74cc9bf7e3571550d3b7757c310b0b368b9f9c90 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Sat, 13 Apr 2019 22:48:14 -0400 Subject: [PATCH] More vimrc. Trying to get coc working --- vimrc | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/vimrc b/vimrc index 0e80f39..3efe0ac 100644 --- a/vimrc +++ b/vimrc @@ -5,30 +5,27 @@ call plug#begin('~/.vim/plugged') Plug 'tomasr/molokai' Plug 'vim-airline/vim-airline' let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#ale#enabled = 1 let g:airline_powerline_fonts = 1 Plug 'vim-airline/vim-airline-themes' Plug 'tpope/vim-repeat' " repeats plugin maps Plug 'tpope/vim-surround' " cs[{ -> change surrounding [ to {, cst -> change surrounding tag, ysiw] -> surround inner word with ], etc. -Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-fugitive' " Gdiff, Gblame, Gstatus - to add/reset, Gcommit Plug 'tpope/vim-endwise' " automatically add end block keyword or symbol -" Plug 'tpope/vim-vinegar' " - -> open better netrw Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-speeddating' " ctrl-a & ctrl-x on dates works Plug 'tpope/vim-jdaddy' " cij: change inner json. gqaj: pretty print json -Plug 'w0rp/ale' " previously 'neomake/neomake, 'scrooloose/syntastic' -" Plug 'SirVer/ultisnips' +Plug 'w0rp/ale' Plug 'honza/vim-snippets' -Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' } -" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -" Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' } +" Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' } Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' Plug 'christoomey/vim-tmux-navigator' " ctrl-l -> right in vim splits then tmux panes, etc. -Plug 'terryma/vim-multiple-cursors' -Plug 'easymotion/vim-easymotion' +Plug 'terryma/vim-multiple-cursors' " ctrl-n -> start & next, ctrl-p -> prev, ctrl-x -> skip +Plug 'easymotion/vim-easymotion' " w -> word, fx -> find x let g:EasyMotion_smartcase = 1 -Plug 'justinmk/vim-sneak' +Plug 'justinmk/vim-sneak' " stp -> jump to next occurance of 'tp'. ; -> next. , -> go back, `` -> back home Plug 'scrooloose/nerdcommenter' " toggle: c, comment: cc Plug 'scrooloose/nerdtree' nnoremap t :NERDTreeToggle @@ -40,7 +37,6 @@ Plug 'kshenoy/vim-signature' " mx -> mark x, dmx delete mark x, m, -> place next Plug 'junegunn/vim-easy-align' " gaip= -> align inner paragraph on = xmap ga (EasyAlign) nmap ga (EasyAlign) -" Plug 'Raimondi/delimitMate' " auto closing of quotes, parens, etc. Plug 'gregsexton/MatchTag' " highlight matching HTML tag Plug 'qstrahl/vim-matchmaker' " highlight matching word under cursor let g:matchmaker_enable_startup = 1 @@ -58,8 +54,6 @@ Plug 'junegunn/goyo.vim' " distraction free mode nmap g :Goyo Plug 'jceb/vim-orgmode' Plug 'sheerun/vim-polyglot' " syntax and indentation for many languages -" Plug 'eagletmt/ghc-mod' -" Plug 'bitc/vim-hdevtools' Plug 'ryanoasis/vim-devicons' " icons in airline, NERDTree, etc. Plug 'TaDaa/vimade' " fade inactive buffer Plug 'mhinz/vim-startify' " fancy start page @@ -67,10 +61,8 @@ Plug 'mhinz/vim-startify' " fancy start page call plug#end() " general goodness -"set shell=/bin/bash " Syntastic breaks when trying to write to /var/folders syntax enable let mapleader="\" -" let mapleader="," let maplocalleader="\\" set hidden " allow hidden unsaved buffers set history=1000 " longer history @@ -119,11 +111,11 @@ nnoremap / :noh set magic " tab stops -set tabstop=4 -set softtabstop=4 -set shiftwidth=4 -set expandtab -set smarttab +" set tabstop=4 +" set softtabstop=4 +" set shiftwidth=4 +" set expandtab +" set smarttab " mouse set mouse=a " a = all modes: nvic @@ -142,11 +134,6 @@ highlight SignColumn ctermbg=NONE highlight LineNr ctermbg=NONE ctermfg=darkgrey " highlight StatusLine guibg=NONE ctermfg=NONE ctermbg=red -" UltiSnips -" let g:UltiSnipsExpandTrigger="" -" let g:UltiSnipsJumpForwardTrigger="" -" let g:UltiSnipsJumpBackwardTrigger="" - " open the current file for edit in Perforce nnoremap p4 :! p4 edit % @@ -190,3 +177,18 @@ nmap 6 6gt nmap 7 7gt nmap 8 8gt nmap 9 9gt + +" Coc +inoremap + \ pumvisible() ? coc#_select_confirm() : + \ coc#expandableOrJumpable() ? coc#rpc#request('doKeymap', ['snippets-expand-jump','']) : + \ check_back_space() ? "\" : + \ coc#refresh() + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +let g:coc_snippet_next = '' +let g:coc_snippet_prev = ''