Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider yats.vim instead of typescript-vim #428

Closed
sQVe opened this issue Sep 4, 2019 · 9 comments
Closed

Consider yats.vim instead of typescript-vim #428

sQVe opened this issue Sep 4, 2019 · 9 comments

Comments

@sQVe
Copy link

sQVe commented Sep 4, 2019

First and and foremost, thank you for an awesome plugin. It really saves us all A LOT of time 馃檹

I've noted that there is atleast one large syntax issue with leafgarland/typescript-vim. It is triggered when writing lambdas / rocket functions with generics like so:

const head = <T>(arr: T[]): T => arr[0]

Above code snippet breaks highlighting for all code below it. HerringtonDarkholme/yats.vim does not have this issue and seems to give better highlighting over the board.

What's the reasoning for opting for leafgarland/typescript-vim over HerringtonDarkholme/yats.vim?

@sheerun
Copy link
Owner

sheerun commented Sep 4, 2019

I tried to use HerringtonDarkholme/yats.vim and it seems to have the same issue

@sheerun
Copy link
Owner

sheerun commented Sep 4, 2019

The issue seems to be with vim-jsx-pretty, not leafgarland/typescript-vim

@sheerun
Copy link
Owner

sheerun commented Sep 4, 2019

I've created issue there: MaxMEllon/vim-jsx-pretty#86

@gbrlsnchs
Copy link

IIRC, https://github.com/HerringtonDarkholme/yats.vim has bad indentation, although syntax is superior to https://github.com/leafgarland/typescript-vim.

@sheerun
Copy link
Owner

sheerun commented Sep 4, 2019

If vim-jsx-pretty fixes this issue in say a month I won't change provider to yats because as mentioned it has worse support for jsx than vim-jsx-pretty.

Maybe suggest yats to integrate with vim-jsx-pretty? Then I'll switch for sure.

@sQVe
Copy link
Author

sQVe commented Sep 4, 2019

@sheerun Nice find!

The best possible solution would be, like you suggested, to integrate jsx-pretty with yats.

@sheerun
Copy link
Owner

sheerun commented Sep 6, 2019

Because there were additional issues with current typescript syntax (#431) I've decided to switch provided to yats, but at the same time leave vim-jsx-pretty so this issue is still present but should probably be fixed in near future.

@sQVe
Copy link
Author

sQVe commented Oct 16, 2019

@sheerun I introduced this issue mainly because of the broken highlighting for rocket functions with generics (const head = <T>(arr: T[]): T => arr[0]). This issue was later tracked down to being a problem with vim-jsx-pretty (MaxMEllon/vim-jsx-pretty#86). The other issues mentioned here, #431 which became #432, was due to a styled-components plugin.

What other reasons was there behind opting for yats.vim, except you getting understandingly tired of all these TypeScript issues? Both providers, yats.vim and typescript.vim, have their upsides and downsides. After using both for quite some time I would probably consider typescript.vim to be more stable but less fancy. yats.vim wins in highlighting and that it is, at the very least, active in regards of PRs etc.

@sheerun
Copy link
Owner

sheerun commented Oct 16, 2019

I'm indifferent because I don't use typescript very much. For now it's yats.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants