From 7a0f2d974f9ac5bc85607e8c769d3370dd18ac74 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 7 Dec 2019 12:21:37 +0100 Subject: Update --- after/indent/javascript.vim | 2 +- after/indent/javascriptreact.vim | 5 +++++ after/indent/typescript.vim | 2 +- after/indent/typescriptreact.vim | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 after/indent/javascriptreact.vim create mode 100644 after/indent/typescriptreact.vim (limited to 'after/indent') diff --git a/after/indent/javascript.vim b/after/indent/javascript.vim index f183061c..24b7f937 100644 --- a/after/indent/javascript.vim +++ b/after/indent/javascript.vim @@ -21,7 +21,7 @@ if exists('s:did_indent') endif setlocal indentexpr=GetJsxIndent() -setlocal indentkeys=0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ +setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ function! GetJsxIndent() return jsx_pretty#indent#get(function('GetJavascriptIndent')) diff --git a/after/indent/javascriptreact.vim b/after/indent/javascriptreact.vim new file mode 100644 index 00000000..e423f0ed --- /dev/null +++ b/after/indent/javascriptreact.vim @@ -0,0 +1,5 @@ +if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1) + +source :h/javascript.vim + +endif diff --git a/after/indent/typescript.vim b/after/indent/typescript.vim index b7f0d185..dd8ee271 100644 --- a/after/indent/typescript.vim +++ b/after/indent/typescript.vim @@ -26,7 +26,7 @@ if exists('s:did_indent') endif setlocal indentexpr=GetJsxIndent() -setlocal indentkeys=0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ +setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ function! GetJsxIndent() return jsx_pretty#indent#get(function('GetTypescriptIndent')) diff --git a/after/indent/typescriptreact.vim b/after/indent/typescriptreact.vim new file mode 100644 index 00000000..931839b1 --- /dev/null +++ b/after/indent/typescriptreact.vim @@ -0,0 +1,5 @@ +if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1) + +source :h/typescript.vim + +endif -- cgit v1.2.3