StarlaneStudios / vscode-comment-anchors

⚓A Visual Studio Code extension that adds support for comment anchors 🔭
https://marketplace.visualstudio.com/items?itemName=ExodiusStudios.comment-anchors
MIT License
206 stars 32 forks source link

Just highlight the comment and doesn't add anchor (disableAnchor option) #128

Closed jd-solanki closed 3 years ago

jd-solanki commented 3 years ago

Hi, I am really loving this extension as I wanted to bookmark and wanted quick navigation.

Previously I was using better comments extension which was great to separate out comments like info, breaking-change or tip

Right now I am using your extension and it is working really well for me expect I am missing feature of just highlighting the comment and don't add anchoring to sidebar.

Right now If I add my custom anchor let's say ℹ️ and use it in a comment which is informative like below:

// ℹ️ You can also use `Object.assign`
const x = { ...a, ...b};

This also creates an anchor for it.

So, if you can add option to anchors' options like disableAnchor for not enabling anchor and just highlight that comment that will be awesome.

macjuul commented 3 years ago

Hey,

Thanks for your suggestion. As hiding specific anchor tags from the sidebar was not previously possible, I've gone ahead and introduced a new hidden scope which should provide the desired behavior.

If we find no further issues with this approach we'll ship a new release as soon as we have time.

I've attached a manual package of the extension in case you would like to give feedback All you have to do is set the scope value of a tag to hidden and it should no longer show up in the sidebar.

Thanks!

jd-solanki commented 3 years ago

Hi @macjuul

I tested your alpha release in my project and used:

{
  "tag": "ℹ️",
  "scope": "hidden",
  "highlightColor": "#3498DB",
  "styleComment": true,
  "isItalic": false,
},

and it is working like a charm. Sidebar is no longer showing anchors with "scope": "hidden"

Thanks for the quick response. I will let you know if I can give you any feedback on alpha release, but for now it is working :heart:

Shall I close this now?

macjuul commented 3 years ago

Awesome!

I'll go ahead and close this issue, if you do run into any more issues feel free to leave a comment