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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a reason why Line Comments are being redefined? #156

Open
rschristian opened this issue Sep 30, 2022 · 0 comments
Open

Is there a reason why Line Comments are being redefined? #156

rschristian opened this issue Sep 30, 2022 · 0 comments

Comments

@rschristian
Copy link

" in-built
syntax match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo
syntax match typescriptLineComment "//.*" contains=@Spell,typescriptCommentTodo,typescriptRef,typescriptMagicComment

" vim-jsx-pretty
syntax region javascriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend
syntax region typescriptLineComment start=+//+ end=/$/ contains=@Spell,typescriptCommentTodo,typescriptRef extend keepend

Is there a reason for (re)defining these values? I cannot see what value this actually offers.

It creates issues in my setup as I disable yats/Vim's built-in TS syntax as it greatly diverges from the JS syntax and the things that go along with that (groups, highlighting standards, etc). As such, I was rather surprised to see typescriptLineComment start popping up, and tracked it down to this plugin.

I'd understand redefining the groups to exclude them from JSX blocks but that's seemingly not what's being done here. As it stands, it looks to just be a redefining of syntax groups that already exist or, in my rather particular case, defining groups that are trying to be avoided.

I'm happy to fork and move on, but this feels quite odd as it isn't providing any real difference to existing line comment syntax groups as far as I can tell.

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

1 participant