Open moriakijp opened 6 years ago
Hi @moriakijp, this sounds like a bug. //
should not trigger a comment block in HTML. Only <!-- ! error -->
should highlight.
Can you send a screenshot of the behavior you see?
Hi. @aaron-bond.
Appearances:
Added part in settings.json:
"better-comments.tags": [
{
"tag": "!",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(0, 100%, 10%)"
},
{
"tag": "<",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(30, 100%, 10%)"
},
{
"tag": ">",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(60, 100%, 10%)"
},
{
"tag": "#",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(120, 100%, 10%)"
},
{
"tag": "+",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(180, 100%, 10%)"
},
{
"tag": "-",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(240, 100%, 10%)"
},
{
"tag": "?",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(300, 100%, 10%)"
},
{
"tag": "/",
"color": "#6a9955",
"strikethrough": true,
"backgroundColor": "transparent"
}
],
It is set to change only the background color.
Environment:
thanks.
I'm not sure I understand. Your settings are using #6a9955
which is the green you see in the image above?
{
"tag": "<",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(30, 100%, 10%)"
},
That's what's coloring your text green? What appearance are you looking to achieve?
Yes. That green is #6a9955
(which is default value of vscode theme).
I'm aiming to achieve the following state: [ General ] background is red. [ html ] background is nothing.
I think @moriakijp means something like this:
better-comments.excludeLanguages: {
"html" : "<",
"php" : ["!", "?"],
}
Where the key is the language and the string/array behind it is the tags you don't want to use in that language. With this example, the < tag won't be shown in html files and the ! and ? tags won't be shown in php files. The other tags will be shown just like normal.
Ah! That would be an interesting feature... Is this what you're looking for @moriakijp?
Yes. it's nice proposal, @pim-moeskops shown what I'd like to meant.
Is this option available now? I can't see it in settings.json...
No it hasn't been implemented yet. It's on the list though
Alright then thanks for the prompt reply
+1 vote for this
In AutoHotkey you use certain syntax to indicate a hotkey to be used, and of course, with better-comments it makes this happen...
No biggie but would love to see this as an option in tags such as...
"better-comments.tags": [
{
"tag": "!",
"color": "#6a9955",
"strikethrough": false,
"backgroundColor": "hsl(0, 100%, 10%)",
"ignoredFileExtensions": [ "ahk" ]
}
]
and also, live reload of the extension, or at least tab-reload reloading of the extension, would be awesome too!
Ref also #470
Many languages are valid with // or / / comment style. So we only need to write "better-comment.tags" in settings.json once.
However, some languages shouldn't to be effective. In order to remove it from the effective range, "better-comment.tags" will be written almost twice or more.
For example: //! WARNING RED shoud not be enabled for html default comment style .
So I thought that it would be nice to add feature to exclude a particular language.