Skip to content

Commit

Permalink
use default coc actions
Browse files Browse the repository at this point in the history
  • Loading branch information
theniceboy authored and David Chen committed Dec 26, 2020
1 parent fb7eec4 commit d59fcd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Ultisnips/dart.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ setState(() {})${0}
endsnippet

snippet rf "Request focus"
FocusScope.of(context).requestFocus(${0});
FocusScope.of(context).requestFocus(${1:FocusNode()})${0}
endsnippet

snippet rfn "Request focusnode (new)"
Expand Down
13 changes: 6 additions & 7 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ noremap S :w<CR>
" Open the vimrc file anytime
noremap <LEADER>rc :e ~/.config/nvim/init.vim<CR>
noremap <LEADER>rv :e .nvimrc<CR>
" Undo operations
noremap l u
Expand Down Expand Up @@ -633,7 +634,6 @@ nnoremap <LEADER>g= :GitGutterNextHunk<CR>
" === coc.nvim
" ===
let g:coc_global_extensions = [
\ 'coc-actions',
\ 'coc-css',
\ 'coc-diagnostic',
\ 'coc-explorer',
Expand All @@ -650,7 +650,6 @@ let g:coc_global_extensions = [
\ 'coc-stylelint',
\ 'coc-syntax',
\ 'coc-tasks',
\ 'coc-todolist',
\ 'coc-translator',
\ 'coc-tslint-plugin',
\ 'coc-tsserver',
Expand Down Expand Up @@ -711,12 +710,12 @@ nmap ts <Plug>(coc-translator-p)
function! s:cocActionsOpenFromSelected(type) abort
execute 'CocCommand actions.open ' . a:type
endfunction
xmap <silent> <leader>a :<C-u>execute 'CocCommand actions.open ' . visualmode()<CR>
nmap <silent> <leader>a :<C-u>set operatorfunc=<SID>cocActionsOpenFromSelected<CR>g@
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>aw <Plug>(coc-codeaction-selected)w
" coctodolist
nnoremap <leader>tn :CocCommand todolist.create<CR>
nnoremap <leader>tl :CocList todolist<CR>
nnoremap <leader>tu :CocCommand todolist.download<CR>:CocCommand todolist.upload<CR>
" nnoremap <leader>tn :CocCommand todolist.create<CR>
" nnoremap <leader>tl :CocList todolist<CR>
" nnoremap <leader>tu :CocCommand todolist.download<CR>:CocCommand todolist.upload<CR>
" coc-tasks
noremap <silent> <leader>ts :CocList tasks<CR>
" coc-snippets
Expand Down

0 comments on commit d59fcd2

Please sign in to comment.