Skip to content

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

@rschristian

Description

@rschristian
" 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions