Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
fleischie committed Oct 11, 2019
2 parents 0a2fcd2 + 386d120 commit 424563c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions after/ftplugin/javascriptreact.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! ftplugin/javascript.vim
1 change: 0 additions & 1 deletion after/ftplugin/typescript.vim

This file was deleted.

1 change: 1 addition & 0 deletions after/ftplugin/typescript.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! ftplugin/javascript.vim
1 change: 1 addition & 0 deletions after/ftplugin/typescriptreact.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! ftplugin/typescript.vim
14 changes: 10 additions & 4 deletions after/indent/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,20 @@ fu! GetStyledIndent()
" `is_recursion` being 0 at this point indicates, that
" `eval(b:js_ts_indent)` did itself evaluate it's stored indentexpr
" and thus it can be assumed, that the current line should be
" indented as JS
" indented as JS/TS
if s:is_recursion == 0
" use one of `GetJavascriptIndent` or `GetJsIndent` if existing
" use one of existing indent expressions if available
" fallback to cindent, if not
if exists('*GetJavascriptIndent')
let l:result = GetJavascriptIndent()
if exists('*GetTsxIndent')
let l:result = GetTsxIndent()
elseif exists('*GetTypescriptIndent')
let l:result = GetTypescriptIndent()
elseif exists('*GetJsxIndent')
let l:result = GetJsxIndent()
elseif exists('*GetJsIndent')
let l:result = GetJsIndent()
elseif exists('*GetJavascriptIndent')
let l:result = GetJavascriptIndent()
else
let l:result = cindent(v:lnum)
endif
Expand Down
1 change: 1 addition & 0 deletions after/indent/javascriptreact.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! indent/javascript.vim
1 change: 1 addition & 0 deletions after/indent/typescriptreact.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! indent/javascript.vim
1 change: 1 addition & 0 deletions after/syntax/javascriptreact.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! syntax/javascript.vim
1 change: 1 addition & 0 deletions after/syntax/typescriptreact.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime! syntax/typescript.vim

0 comments on commit 424563c

Please sign in to comment.