vim-autoformat / vim-autoformat

Provide easy code formatting in Vim by integrating existing code formatters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typescriptreact formatter

isaacguerreir opened this issue · comments

Hi,

I'm getting this error when using :Autoformat in a tsx file.

Error detected while processing function <SNR>48_TryAllFormatters[5]..<SNR>48_find_formatters: line 43: No formatters defined for supertype typescriptreact line 58: No formatters defined for filetype 'typescriptreact'. 27 lines indented

I already have installed globally the typescript and typescript-formatter library. I don't find in documentation anything citing the typescriptreact formatted.

Anyone know how I can correct this problem?

The filetype is recognized as typescriptreact and not as typescript. You will have to change you filetype to typescript, or copy the formatter definitions to typescriptreact specific versions.