~yerinalexey/dotfiles

ref: b75055cfb2820b41efd348481e49a2f487355931 dotfiles/nvim/peartree.vim -rw-r--r-- 803 bytes
b75055cf — Alexey Yerin bottom: fix indents 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
" Configuration for pear-tree

" Map special keys (exept Enter)
let g:pear_tree_map_special_keys = 0

imap <BS> <Plug>(PearTreeBackspace)
imap <Space> <Plug>(PearTreeSpace)

" I don't care about dot-repeat
let g:pear_tree_repeatable_expand = 0

" Custom language mappings
augroup peartree
  au!

  " JSX stuff
  au FileType typescriptreact,javascript,javascriptreact
    \ let b:pear_tree_pairs = extend(deepcopy(g:pear_tree_pairs), {
    \   '<>': { 'closer': '</>' },
    \   '<*>': {
    \     'closer': '</*>',
    \     'not_if': ['br', 'hr', 'img', 'input', 'link', 'meta',
    \                'area', 'base', 'col', 'command', 'embed',
    \                'keygen', 'param', 'source', 'track', 'wbr'],
    \     'until': '\W',
    \     'not_like': '/$'
    \   }
    \ }, 'keep')
augroup END