nvim: coc hype
This commit is contained in:
parent
32ca185cd3
commit
52691520e8
1 changed files with 59 additions and 26 deletions
|
@ -21,18 +21,17 @@ Plug 'Yggdroot/indentLine'
|
||||||
Plug 'rakr/vim-one'
|
Plug 'rakr/vim-one'
|
||||||
|
|
||||||
" Programming helpers
|
" Programming helpers
|
||||||
Plug 'Chiel92/vim-autoformat'
|
"Plug 'dense-analysis/ale'
|
||||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
"Plug 'deoplete-plugins/deoplete-jedi'
|
||||||
|
"Plug 'sebastianmarkow/deoplete-rust'
|
||||||
|
"Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
Plug 'bkad/CamelCaseMotion'
|
Plug 'bkad/CamelCaseMotion'
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
Plug 'Chiel92/vim-autoformat'
|
||||||
Plug 'dense-analysis/ale'
|
|
||||||
Plug 'deoplete-plugins/deoplete-jedi'
|
|
||||||
Plug 'easymotion/vim-easymotion'
|
Plug 'easymotion/vim-easymotion'
|
||||||
Plug 'godlygeek/tabular'
|
Plug 'godlygeek/tabular'
|
||||||
Plug 'junegunn/vim-easy-align'
|
Plug 'junegunn/vim-easy-align'
|
||||||
Plug 'keith/swift.vim'
|
|
||||||
Plug 'majutsushi/tagbar'
|
Plug 'majutsushi/tagbar'
|
||||||
Plug 'sebastianmarkow/deoplete-rust'
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
Plug 'tpope/vim-eunuch'
|
Plug 'tpope/vim-eunuch'
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
|
@ -51,12 +50,14 @@ Plug 'evanleck/vim-svelte'
|
||||||
Plug 'gryf/kickass-syntax-vim'
|
Plug 'gryf/kickass-syntax-vim'
|
||||||
Plug 'hiphish/jinja.vim'
|
Plug 'hiphish/jinja.vim'
|
||||||
Plug 'hsanson/vim-android'
|
Plug 'hsanson/vim-android'
|
||||||
|
Plug 'jceb/vim-orgmode'
|
||||||
|
Plug 'keith/swift.vim'
|
||||||
Plug 'leafgarland/typescript-vim'
|
Plug 'leafgarland/typescript-vim'
|
||||||
Plug 'lervag/vimtex'
|
Plug 'lervag/vimtex'
|
||||||
Plug 'martinda/Jenkinsfile-vim-syntax'
|
Plug 'martinda/Jenkinsfile-vim-syntax'
|
||||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||||
Plug 'othree/yajs.vim'
|
|
||||||
Plug 'mitsuhiko/vim-jinja'
|
Plug 'mitsuhiko/vim-jinja'
|
||||||
|
Plug 'othree/yajs.vim'
|
||||||
Plug 'peitalin/vim-jsx-typescript'
|
Plug 'peitalin/vim-jsx-typescript'
|
||||||
Plug 'plasticboy/vim-markdown'
|
Plug 'plasticboy/vim-markdown'
|
||||||
Plug 'posva/vim-vue'
|
Plug 'posva/vim-vue'
|
||||||
|
@ -64,8 +65,6 @@ Plug 'rust-lang/rust.vim'
|
||||||
Plug 'tikhomirov/vim-glsl'
|
Plug 'tikhomirov/vim-glsl'
|
||||||
Plug 'udalov/kotlin-vim'
|
Plug 'udalov/kotlin-vim'
|
||||||
Plug 'ziglang/zig.vim'
|
Plug 'ziglang/zig.vim'
|
||||||
Plug 'jceb/vim-orgmode'
|
|
||||||
Plug 'fatih/vim-go'
|
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
@ -87,6 +86,7 @@ let &colorcolumn="+".join(range(1, 255), ",+")
|
||||||
set termguicolors
|
set termguicolors
|
||||||
nnoremap <F4> :buffers<CR>:buffer<Space>
|
nnoremap <F4> :buffers<CR>:buffer<Space>
|
||||||
let maplocalleader="\<space>"
|
let maplocalleader="\<space>"
|
||||||
|
let mapleader=","
|
||||||
|
|
||||||
" Tagbar
|
" Tagbar
|
||||||
nmap <silent> <F8> :TagbarOpenAutoClose<CR>
|
nmap <silent> <F8> :TagbarOpenAutoClose<CR>
|
||||||
|
@ -232,24 +232,24 @@ map <C-n> :NERDTreeToggle<CR>
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
|
|
||||||
""" Deoplete
|
""" Deoplete
|
||||||
let g:deoplete#enable_at_startup = 1
|
"let g:deoplete#enable_at_startup = 1
|
||||||
call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' })
|
"call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' })
|
||||||
|
|
||||||
""" ale
|
""" ale
|
||||||
let g:ale_linters = { 'python': ['flake8', 'mypy'], 'go': ['gopls'], 'cpp': ['clangcheck'] }
|
"let g:ale_linters = { 'python': ['flake8', 'mypy'], 'go': ['gopls'], 'cpp': ['clangcheck'] }
|
||||||
let g:ale_fixers = {
|
"let g:ale_fixers = {
|
||||||
\ 'python': ['black'],
|
"\ 'python': ['black'],
|
||||||
\ 'cpp': ['clang-format'],
|
"\ 'cpp': ['clang-format'],
|
||||||
\ 'javascript': ['eslint', 'prettier'],
|
"\ 'javascript': ['eslint', 'prettier'],
|
||||||
\ 'yaml': ['prettier'],
|
"\ 'yaml': ['prettier'],
|
||||||
\ 'go': ['gofmt', 'goimports'],
|
"\ 'go': ['gofmt', 'goimports'],
|
||||||
\ }
|
"\ }
|
||||||
let g:ale_python_flake8_options='--max-line-length=88'
|
"let g:ale_python_flake8_options='--max-line-length=88'
|
||||||
let g:ale_python_mypy_options='--ignore-missing-imports'
|
"let g:ale_python_mypy_options='--ignore-missing-imports'
|
||||||
let g:ale_c_parse_compile_commands = 1
|
"let g:ale_c_parse_compile_commands = 1
|
||||||
let g:ale_c_build_dir_names = ['build', 'bin', '.']
|
"let g:ale_c_build_dir_names = ['build', 'bin', '.']
|
||||||
let g:ale_completion_enabled = 0
|
"let g:ale_completion_enabled = 0
|
||||||
set omnifunc=ale#completion#OmniFunc
|
"set omnifunc=ale#completion#OmniFunc
|
||||||
|
|
||||||
" Python
|
" Python
|
||||||
if executable('pyls')
|
if executable('pyls')
|
||||||
|
@ -307,3 +307,36 @@ let g:easy_align_delimiters = {
|
||||||
""" vim-go
|
""" vim-go
|
||||||
let g:go_imports_autosave = 1
|
let g:go_imports_autosave = 1
|
||||||
let g:go_auto_type_info = 1
|
let g:go_auto_type_info = 1
|
||||||
|
|
||||||
|
""" coc
|
||||||
|
function! s:cocActionsOpenFromSelected(type) abort
|
||||||
|
execute 'CocCommand actions.open ' . a:type
|
||||||
|
endfunction
|
||||||
|
xmap <silent> <leader>c :<C-u>execute 'CocCommand actions.open ' . visualmode()<CR>
|
||||||
|
nmap <silent> <leader>c :<C-u>set operatorfunc=<SID>cocActionsOpenFromSelected<CR>g@
|
||||||
|
|
||||||
|
nmap <expr> <silent> <C-d> <SID>select_current_word()
|
||||||
|
function! s:select_current_word()
|
||||||
|
if !get(g:, 'coc_cursors_activated', 0)
|
||||||
|
return "\<Plug>(coc-cursors-word)"
|
||||||
|
endif
|
||||||
|
return "*\<Plug>(coc-cursors-word):nohlsearch\<CR>"
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
nmap <leader>rn <Plug>(coc-rename)
|
||||||
|
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
|
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
|
nmap <leader>ac <Plug>(coc-codeaction)
|
||||||
|
nmap <leader>qf <Plug>(coc-fix-current)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
command! -nargs=0 Format :call CocAction('format')
|
||||||
|
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||||
|
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
||||||
|
|
||||||
|
""" ctrlp
|
||||||
|
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
|
||||||
|
|
Loading…
Reference in a new issue