@@ -2,7 +2,7 @@ call plug#begin('~/.vim/plug-bundles')
2
2
3
3
" ====================== COC =========================
4
4
Plug ' neoclide/coc.nvim' , {' branch' : ' release' }
5
- let g: coc_global_extensions = [' coc-html' , ' coc-phpls' , ' coc-css' , ' coc-sql ' , ' coc-json ' , ' coc-yaml ' , ' coc-marketplace ' , ' coc- tsserver' , ' coc-tabnine ' ]
5
+ let g: coc_global_extensions = [' coc-html' , ' coc-phpls' , ' coc-css' , ' coc-tsserver' ]
6
6
7
7
function ! s: show_documentation ()
8
8
if (index ([' vim' ,' help' ], &filetype ) >= 0 )
@@ -18,6 +18,12 @@ set signcolumn=yes
18
18
" Use K to show documentation in preview window
19
19
nnoremap <silent> K :call <SID> show_documentation()<CR>
20
20
21
+ " To make <CR> auto-select the first completion item and notify coc.nvim to format on enter
22
+ inoremap <silent> <expr> <cr> pumvisible() ? coc#_select_confirm()
23
+ \ : "\<C-g> u\<CR> \<c-r> =coc#on_enter()\<CR> "
24
+
25
+ nmap <c-]> <Plug> (coc-declaration)
26
+
21
27
" Highlight symbol under cursor on CursorHold
22
28
autocmd CursorHold * silent call CocActionAsync (' highlight' )
23
29
@@ -120,7 +126,7 @@ Plug 'morhetz/gruvbox'
120
126
call plug#end ()
121
127
122
128
set nocompatible " choose no compatibility with legacy vi
123
- set hidden " if hidden is not set, TextEdit might fail.
129
+ " set hidden " if hidden is not set, TextEdit might fail.
124
130
set cmdheight = 2 " Better display for messages
125
131
set updatetime = 300 " You will have bad experience for diagnostic
126
132
" messages when it's default 4000.
@@ -169,8 +175,10 @@ set nocursorline
169
175
170
176
syntax sync minlines =256
171
177
set synmaxcol = 3000
178
+
172
179
autocmd FileType html syntax sync fromstart
173
180
autocmd FileType xml syntax sync fromstart
181
+ autocmd FileType tpl syntax sync fromstart
174
182
175
183
" " Pretty wrap indent
176
184
if exists (" &breakindent" )
0 commit comments