aaron-bond / better-comments

https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
MIT License
848 stars 161 forks source link

[Feature] Filter List #141

Open SirProdigle opened 5 years ago

SirProdigle commented 5 years ago

A config options for an array of filters that don't activate highlights would be nice. It's annoying when for instance bash shebangs #!/bin/bash come up highlighted

aaron-bond commented 5 years ago

A whitelist is an interesting idea - though I've already implemented something which stops the first line from activating the comment highlight for certain languages in order to catch the scenario here. What language are you seeing this happen in?

ghost commented 5 years ago

I second this. I tend to use virtualenvs very often when I write python code, and better comments highlights everything within the library files.

aaron-bond commented 5 years ago

@RamIyer1998 is it an option to remove the ! tag from your settings and use some alternative?

ghost commented 5 years ago

My bad, I thought this was for a different suggestion. I was thinking of a config option where you could exclude certain directories from highlighting in better-comments (similar to a .gitignore file).

ghost commented 5 years ago

Should I open a separate issue for that, or is it already a feature?

aaron-bond commented 5 years ago

Check out the README

"better-comments.tags": [
  {
    "tag": "!",
    "color": "#FF2D00",
    "strikethrough": false,
    "backgroundColor": "transparent"
  },
  {
    "tag": "?",
    "color": "#3498DB",
    "strikethrough": false,
    "backgroundColor": "transparent"
  },
  {
    "tag": "//",
    "color": "#474747",
    "strikethrough": true,
    "backgroundColor": "transparent"
  },
  {
    "tag": "todo",
    "color": "#FF8C00",
    "strikethrough": false,
    "backgroundColor": "transparent"
  },
  {
    "tag": "*",
    "color": "#98C379",
    "strikethrough": false,
    "backgroundColor": "transparent"
  }
]

These are the defaults but you can change them to anything you'd like. Just open your user settings and copy this block in, changing whatever values you want to (you can also add new tags in if you like).