-
Notifications
You must be signed in to change notification settings - Fork 72
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsuquyomi is not enabled for TS files with JSX in vim 8.2 #300
Comments
I'm experiencing this as well. I currently have to set my |
I can confirm it's quite annoying For a full workaround I personnally added in my
|
I’ve been using your script all day @Narsil! It’s a great temporary fix and has definitely saved me some time today. |
Thanks for the config @Narsil! I still had a few extra difficulties with syntax highlighting and type checking, specifically when switching between .tsx and .ts files, so in case anyone else is having issues, this worked better for me: augroup typescript
au!
autocmd BufNewFile,BufRead *.tsx set filetype=typescript
autocmd BufNewFile,BufRead *.tsx set syntax=typescriptreact
autocmd BufNewFile,BufRead *.ts set filetype=typescript
autocmd BufNewFile,BufRead *.ts set syntax=javascript
augroup END Note: I'm using leafgarland/typescript-vim for syntax highlighting so if you're using something else, it might behave differently. |
In vim 8.2, a new built-in filetype for TypeScript files has been added according to this issue: vim/vim#4830. The new file type is
typescriptreact
.Files previously detected as
typescript
are now detected astypescriptreact
. This causes the tsuquyomi plugin to remain disabled when editing a file in a react-based project (for instance).My current workaround is to force the filetype to be set to
typescript
:That being said, this is a workaround and it'd be nice if this plugin could support the new filetype.
The text was updated successfully, but these errors were encountered: