Skip to content

Commit

Permalink
fix the pear-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gko committed Jul 16, 2023
1 parent 797bc5d commit b2dbc59
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions after/plugin/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ if has('nvim') || !exists("g:coc_enabled") || !executable('npm')
finish
endif

" https://github.com/tmsvg/pear-tree/issues/33#issuecomment-777888854

" Disable automapping so we can fix Coc mapping.
let g:pear_tree_map_special_keys = 0

" Default mappings:
imap <BS> <Plug>(PearTreeBackspace)
imap <Esc> <Plug>(PearTreeFinishExpansion)
" Get PearTreeExpand working with coc.nvim
imap <expr> <CR> pumvisible() ? coc#_select_confirm() : "\<Plug>(PearTreeExpand)"
" https://github.com/neoclide/coc.nvim#example-vim-configuration

" May need for Vim (not Neovim) since coc.nvim calculates byte offset by count
Expand Down
3 changes: 2 additions & 1 deletion init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ call plug#begin()

" https://github.com/tmsvg/pear-tree/issues/33
" breaks the CR for the popup (i.e. in coc.nvim)
" Plug 'tmsvg/pear-tree'
" temporary fix https://github.com/tmsvg/pear-tree/issues/33#issuecomment-777888854 (see /after/plugin/lsp.vim)
Plug 'tmsvg/pear-tree'

Plug 'terryma/vim-multiple-cursors'
Plug 'gcmt/taboo.vim'
Expand Down

0 comments on commit b2dbc59

Please sign in to comment.