preservim / nerdcommenter

Vim plugin for intensely nerdy commenting powers
Creative Commons Zero v1.0 Universal
4.99k stars 445 forks source link

Add support for Svelte #502

Closed brainwo closed 2 years ago

brainwo commented 2 years ago

Svelte language

matthewblott commented 2 years ago

The problem here is Html is just one part of the Svelte component. JavaScript and CSS end up using Html comments with this fix. Can the comment type only be filtered by file type?

alerque commented 2 years ago

Yes, currently we only filter by filetype. There is a long standing feature request to handled nested blocks of other languages, but so far nobody has contributed a working version that handles that. For some pairs and with other plugins that set comment strings it can sometimes work out better to disable this entirely.

matthewblott commented 2 years ago

Okay thanks for the quick response. I've just set the comments for Svelte to use JavaScript type comments. It's a hack but that's mostly what I need to comment / uncomment in a Svelte component.