You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that this doesn't happen on yats.vim, but whenever having both yats.vim and vim-jsx-pretty, I believe that this plugin overrides the indentation rules set by yats.vim.
The text was updated successfully, but these errors were encountered:
It's hard to differentiate the JSX syntax from generic syntax in typescript with plain regex syntax highlighting because the following is also a valid JSX syntax.
constT='div';return<Textendsstring>text</T>;
Currently, we will treat all the <T as a generic and this problem can be resolved.
BTW, even though I comment out vim-jsx-pretty, this problem still exists on my machine.
sorry for the necromancy, but i'm curious if allowing generics with names other than T is an impossible problem to solve or if the TS/Flow highlighting should run after the jsx highlighting? currently vim-polyglot runs vim-javascript before jsx_pretty.
Whenever having the following on typescript:
The indented result becomes like:
This is due to
foo
accepting a generic<T extends string>
, as if we take out the generic, the indentation works as expected.The only workaround at the moment is declaring a long form function as:
I've noticed that this doesn't happen on yats.vim, but whenever having both yats.vim and vim-jsx-pretty, I believe that this plugin overrides the indentation rules set by yats.vim.
The text was updated successfully, but these errors were encountered: