diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-10 10:30:32 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-10 10:30:32 +0200 |
commit | fb7cf8a9ab782d67db5aa71bffac67e63fcc0c4c (patch) | |
tree | 9b41186c43daaacf5b6d1cee71f8bde4dbc8edf2 /after/indent/jsx.vim | |
parent | 19a69cf77d521d6f3856d2f5c1a2faa678b937ba (diff) | |
download | vim-polyglot-fb7cf8a9ab782d67db5aa71bffac67e63fcc0c4c.tar.gz vim-polyglot-fb7cf8a9ab782d67db5aa71bffac67e63fcc0c4c.zip |
Update
Diffstat (limited to 'after/indent/jsx.vim')
-rw-r--r-- | after/indent/jsx.vim | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/after/indent/jsx.vim b/after/indent/jsx.vim new file mode 100644 index 00000000..fcd7b5ad --- /dev/null +++ b/after/indent/jsx.vim @@ -0,0 +1,33 @@ +if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vim indent file +" +" Language: javascript.jsx +" Maintainer: MaxMellon <maxmellon1994@gmail.com> +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +if exists('b:did_indent') + let s:did_indent = b:did_indent + unlet b:did_indent +endif + +let s:keepcpo = &cpo +set cpo&vim + +if exists('s:did_indent') + let b:did_indent = s:did_indent +endif + +setlocal indentexpr=GetJsxIndent() +setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ + +function! GetJsxIndent() + return jsx_pretty#indent#get(function('GetJavascriptIndent')) +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo + +endif |