diff --git a/vim/coc-settings.json b/vim/coc-settings.json new file mode 100644 index 0000000..a5802eb --- /dev/null +++ b/vim/coc-settings.json @@ -0,0 +1,8 @@ +{ + "coc.preferences.useQuickfixForLocations": true, + "coc.preferences.snippets.enable": true, + "coc.preferences.extensionUpdateCheck": "never", + "suggest.disableMenu": true, + "suggest.snippetIndicator": "", + "clangd.path": "~/.config/coc/extensions/coc-clangd-data/install/18.1.3/clangd_18.1.3/bin/clangd" +} diff --git a/vim/plugged/auto-pairs b/vim/plugged/auto-pairs new file mode 160000 index 0000000..39f06b8 --- /dev/null +++ b/vim/plugged/auto-pairs @@ -0,0 +1 @@ +Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76 diff --git a/vim/plugged/coc.nvim b/vim/plugged/coc.nvim index 69b16f8..57d488a 160000 --- a/vim/plugged/coc.nvim +++ b/vim/plugged/coc.nvim @@ -1 +1 @@ -Subproject commit 69b16f8651b4d92d9ea5d6b000c084f275ed7928 +Subproject commit 57d488a06bdb34de89acef3c2f3e9ce609d632ed diff --git a/vim/plugged/onedark.vim b/vim/plugged/onedark.vim new file mode 160000 index 0000000..390b893 --- /dev/null +++ b/vim/plugged/onedark.vim @@ -0,0 +1 @@ +Subproject commit 390b893d361c356ac1b00778d849815f2aa44ae4 diff --git a/vim/plugged/vim-polyglot b/vim/plugged/vim-polyglot new file mode 160000 index 0000000..692e359 --- /dev/null +++ b/vim/plugged/vim-polyglot @@ -0,0 +1 @@ +Subproject commit 692e359ad9344d6e69626131f5c96743560e4d53 diff --git a/vim/plugged/vim-sensible b/vim/plugged/vim-sensible new file mode 160000 index 0000000..0ce2d84 --- /dev/null +++ b/vim/plugged/vim-sensible @@ -0,0 +1 @@ +Subproject commit 0ce2d843d6f588bb0c8c7eec6449171615dc56d9 diff --git a/vimrc b/vimrc index 2562cbe..14b6730 100644 --- a/vimrc +++ b/vimrc @@ -15,17 +15,23 @@ set showcmd set showmode set showmatch set hlsearch +set nowritebackup +set encoding=utf-8 +set updatetime=300 +set signcolumn=yes + " PLUGINS ---------------------------------------------------------------- {{{ call plug#begin('~/.vim/plugged') - +Plug 'sheerun/vim-polyglot' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'tpope/vim-sensible' Plug 'preservim/nerdtree' Plug 'jiangmiao/auto-pairs' -Plug 'rrethy/vim-hexokinase', {'do': 'make hexokinase'} +"Plug 'rrethy/vim-hexokinase', {'do': 'make hexokinase'} +Plug 'joshdick/onedark.vim' "Plug 'neoclide/coc.nvim', {'branch': 'release'} "#https://vimawesome.com/plugin/syntastic "#https://vimawesome.com/plugin/vim-airline-superman @@ -38,6 +44,42 @@ call plug#end() " MAPPINGS --------------------------------------------------------------- {{{ " Mappings code goes here. +"inoremap coc#pum#visible() ? coc#pum#confirm() +" \: "\u\\=coc#on_enter()\" + +" Use K to show documentation in preview window +nnoremap K :call ShowDocumentation() + +function! ShowDocumentation() + if CocAction('hasProvider', 'hover') + call CocActionAsync('doHover') + else + call feedkeys('K', 'in') + endif +endfunction + +" Use for trigger snippet expand. +"imap (coc-snippets-expand) +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 = '' + +" Highlight the symbol and its references when holding the cursor +"autocmd * silent call CocActionAsync('highlight') +"inoremap + " \ coc#pum#visible() ? coc#pum#next(1) : + " \ CheckBackspace() ? "\" : + " \ coc#refresh() +"inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" " }}} @@ -52,7 +94,9 @@ call plug#end() "augroup END " More Vimscripts code goes here. - +syntax on +colorscheme onedark +"let g:Hexokinase_highlighters = ['foreground'] " }}}