-
Notifications
You must be signed in to change notification settings - Fork 103
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
React jsx/tsx #283
Comments
Which version do you use? |
I assume jsx works properly because the filetype is |
I'm of latest master (2de3885). As code example it's just a basic react jsx but using typescript, so something like: export default function MyComp() {
const data = 1
return (
<div>
<span>{data}</span>
</div>
)
} Running:
Forcing the filetype to |
Hi. I just encounter this issue too but setting
solve the problem. I hope tcomment can do this automatically, the extension always Cheers. |
I'm having the same problem, setting With
With
With the cursor in the commented JSX code (on an attribute):
I noticed that the comment string changes to the wrong format when the cursor is in the commented block. |
In Vue files it also just comments every block with |
@cloggier Posted a solution for vue here #284 |
@eduardoarandah Thanks, I would rather keep on using treesitter. |
@eduardoarandah You can now use treesitter with https://github.com/JoosepAlviste/nvim-ts-context-commentstring and any |
Comments using the default
ft
in.tsx
files doesn't work, it still adds//
. The only way I got it working was setting theft
tojavascript.jsx
, then comments were working fine for bothjsx
and normaljs
. I also tried setting theft
tojavascriptreact
but it didn't work either.The text was updated successfully, but these errors were encountered: