Closed fleischie closed 4 years ago
The fix should look something like this to also account for vim-jsx-pretty plugin:
if &filetype =~ '^typescript' && exists('*GetTsxIndent')
let s:JsIndentFunction = function('GetTsxIndent')
elseif &filetype =~ '^typescript' && exists('*GetTypescriptIndent')
let s:JsIndentFunction = function('GetTypescriptIndent')
elseif exists('*GetJsxIndent')
let s:JsIndentFunction = function('GetJsxIndent')
elseif exists('*GetJavascriptIndent')
let s:JsIndentFunction = function('GetJavascriptIndent')
elseif exists('*GetJsIndent')
let s:JsIndentFunction = function('GetJsIndent')
end
Oh hey, thanks @sheerun for the hint. I might try it out whenever I feel like I can spare the moment. 🙇👍
I believe the issue is fixed and can be closed?
@sheerun Where should one put the above if/else block in order to fix this?
The indenting in non-styled sections is not working, especially when in tsx sections:
Current behavior:
Somwhat desired behavior: