ianks / vim-tsx

85 stars 8 forks source link

commenting is not highlighted #4

Open suzuki11109 opened 8 years ago

suzuki11109 commented 8 years ago

I've found that the commented line is highlighted correctly when the very first lines of render method is commented. But if I comment lines in the middle, it will not be highlighted correctly.

Here's the image. image

Thanks. 😄

indiesquidge commented 8 years ago

Well, the commenting is technically broken for all of the TSX code because it is treating it like a TypeScript comment. JSX/TSX comments look like {/* ... */}. This is currently an issue in discussion.

But even with the broken comments, I am getting the proper highlighting (although, strangely, it ruins the indentation).

screen shot 2016-06-13 at 9 14 23 pm

Are you using a hotkey or keybinding to comment out the code? Or manually entering //? What editor are you using? What TypeScript highlighting plugin?

suzuki11109 commented 8 years ago

Comments are not highlighted either comment by keybinding or manual. I use https://github.com/HerringtonDarkholme/yats.vim. May be it has some conflict. Which highlighting plugin should I use?

indiesquidge commented 8 years ago

Confirmed, it is an issue with https://github.com/HerringtonDarkholme/yats.vim.

screen shot 2016-06-13 at 10 18 42 pm

I would bring it to their attention. I have had issues with this plugin before. I think it needs to mature a bit before ready for public use.

I would recommend https://github.com/leafgarland/typescript-vim and https://github.com/Quramy/tsuquyomi for TypeScript development in vim. I have been using those extensively for six months now with good results.

1ak31sha commented 5 years ago

i also am finding that commenting attributes on components in the render return jsx do not get highlighted as comments

Screen Shot 2019-08-22 at 1 56 50 PM