From f17f6fc958487117c32669ac159a249a8ce3bbfd Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sun, 12 Sep 2021 14:03:47 -0700 Subject: minimal config --- nvim/.config/nvim/init.vim | 113 --------------------------------------------- 1 file changed, 113 deletions(-) (limited to 'nvim/.config') diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 8978c2d..486385d 100755 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -1,6 +1,5 @@ " vimplug call plug#begin() -Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'Shougo/deol.nvim' Plug 'ap/vim-css-color' Plug 'tpope/vim-eunuch' @@ -149,115 +148,3 @@ set statusline+=%#PrimaryBlock# set statusline+=\ %Y\ set statusline+=%#SecondaryBlock# set statusline+=\ %P\ - -" ------COC SETTINGS------ -" prettier command for coc -command! -nargs=0 Prettier :CocCommand prettier.formatFile -let g:coc_global_extensions = [ - \ 'coc-snippets', - \ 'coc-pairs', - \ 'coc-prettier', - \ 'coc-tsserver', - \ 'coc-html', - \ 'coc-css', - \ 'coc-json', - \ 'coc-clangd', - \ 'coc-python', - \ 'coc-sh', - \ 'coc-vimtex' - \ ] - -" From Coc Readme -set updatetime=300 - -" Some servers have issues with backup files, see #649 -set nobackup -set nowritebackup - -" don't give |ins-completion-menu| messages. -set shortmess+=c - -" always show signcolumns -set signcolumn=yes - -" Use tab for trigger completion with characters ahead and navigate. -" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -inoremap coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -inoremap pumvisible() ? "\" : "\u\" -" Or use `complete_info` if your vim support it, like: -" inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" - -" Use `[g` and `]g` to navigate diagnostics -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - -" Remap keys for gotos -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Remap for rename current word -nmap (coc-rename) - -" Remap for format selected region -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap for do codeAction of current line -nmap ac (coc-codeaction) -" Fix autofix problem of current line -nmap qf (coc-fix-current) - -" Create mappings for function text object, requires document symbols feature of languageserver. -xmap if (coc-funcobj-i) -xmap af (coc-funcobj-a) -omap if (coc-funcobj-i) -omap af (coc-funcobj-a) - -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" use `:OR` for organize import of current buffer -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') - -" Add status line support, for integration with other plugin, checkout `:h coc-status` -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} -- cgit v1.2.3