peitalin / vim-jsx-typescript

React JSX syntax highlighting for vim and Typescript
The Unlicense
305 stars 29 forks source link

COMPLETE UPDATE: change to typescriptreact #33

Closed pappasam closed 3 years ago

pappasam commented 3 years ago

Modernizes this Vim plugin to be compatible with recent versions of Vim/Neovim. Tested by myself and others; verified to work on the latest (nightly) version of Neovim. Also updates the documentation to be compatible with the updates here.

Note: backwards compatibility will likely be lost. That said, since this involves TypeScript / TSX / front end programming, I think everyone should be somewhat used to no backward compatibility :p

The latest versions come bundled with TypeScript syntax highlighting / indentation, but unfortunately no indentation file for typescriptreact. The indentation file in this project works wonderfully!

After merging this PR, I suggest working with both Vim/Neovim to get your indentation file merged as the official typescriptreact indentation file. You've done great work here that should be canonized in the annals of Vim.

HendrikPetertje commented 3 years ago

I don't know how you fixed it, but since updating my Neovim this morning I've been dealing with a problem where all imports in .tsx files look like this:

image

the behavior is consistent through latest versions of base16_* colourschemes, the default neovim colourschemes and all other colourschemes I've tried. The highlighting isn't related to coc.nvim or any other problem. It's just highlighting. Removing this plugin led me to understand that this plugin was most likely being the culprit. then when I updated the plugin to your version the entire tsx file started working like tsx again and the issues were gone:

image

installed plugins: Screenshot 2020-11-25 at 11 23 23

How my linting plugin makes errors/warnings look look image

So thanks for that fix I guess ;), I'll stick with using your branch for a while!

peitalin commented 3 years ago

Great thanks @pappasam for the updates! much appreciated. All seems to work smoothly on my end. Merging. @HendrikPetertje thanks for being our guinea pig and testing!