Last active
August 31, 2021 01:47
-
-
Save griimick/8504ad7431397100ccd542e20a46cfd9 to your computer and use it in GitHub Desktop.
TS-COC-ATOM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'sheerun/vim-polyglot' | |
Plugin 'morhetz/gruvbox' | |
Plugin 'rhysd/conflict-marker.vim' | |
Plugin 'godlygeek/tabular' | |
Plugin 'neoclide/coc.nvim', {'branch': 'release'} | |
let g:coc_disable_startup_warning = 1 | |
call vundle#end() " required | |
filetype plugin indent on " required | |
"""""""""""""""""""""""""" | |
colorscheme gruvbox | |
set background=dark | |
" Workaround for creating transparent bg | |
autocmd SourcePost * highlight Normal ctermbg=NONE guibg=NONE | |
\ | highlight LineNr ctermbg=NONE guibg=NONE | |
\ | highlight SignColumn ctermbg=NONE guibg=NONE | |
""""""""""""""""""""""""" | |
"""""""""""""""""""""""""""""" | |
" Conqueror of Completion COC | |
" | |
set encoding=utf-8 | |
set hidden | |
set cmdheight=2 | |
set updatetime=300 | |
set shortmess+=c | |
inoremap <silent><expr> <TAB> | |
\ pumvisible() ? "\<C-n>" : | |
\ <SID>check_back_space() ? "\<TAB>" : | |
\ coc#refresh() | |
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" | |
function! s:check_back_space() abort | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~# '\s' | |
endfunction | |
nmap <silent> [g <Plug>(coc-diagnostic-prev) | |
nmap <silent> ]g <Plug>(coc-diagnostic-next) | |
nmap <silent> gd <Plug>(coc-definition) | |
nmap <silent> gy <Plug>(coc-type-definition) | |
nmap <silent> gi <Plug>(coc-implementation) | |
nmap <silent> gr <Plug>(coc-references) | |
let g:coc_global_extensions = [ | |
\ 'coc-tsserver' | |
\ ] | |
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint') | |
let g:coc_global_extensions += ['coc-eslint'] | |
endif | |
nnoremap <silent> K :call CocAction('doHover')<CR> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"eslint.probe": ["javascript", "javascriptreact", "typescript", "typescriptreact"], | |
"coc.preferences.formatOnSaveFiletypes": ["typescript", "typescriptreact"], | |
"diagnostic.checkCurrentLine": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment