Git Product home page Git Product logo

vscode-comment-anchors's People

Contributors

alanorozco avatar dependabot[bot] avatar devel0 avatar dolsem avatar eggachecat avatar eritbh avatar gorvgoyl avatar jackson-bean avatar jordandi123 avatar kiliankilmister avatar macjuul avatar mikie avatar netizen-ais avatar pit00 avatar zodsmar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vscode-comment-anchors's Issues

[Feature Request] Disable Intellisense suggestions

Hello! Before anything, I'd like to commend how well done and useful this extension is, especially in huge files or big chunks of code.

I've noticed, however, a small annoyance while using Anchors, and that is how IntelliSense suggestions are executed. There's no setting to turn them off, and at least in my usage (mostly go, dart, python & js) any uppercase letter which starts an Anchor (e.g. "R") goes all way to the top in the suggestions list.

Still, I recognize this issue only matters when you're not too lazy to press a single Down on the keyboard. So take your own time to implement this (and possibly there might be a way within vscode to address the order of words that appear inside the IntelliSense).

[Feature request] Total number of anchors

This extension is very helpful, but the problem is that when you come back after a long time to a project and forget everything about the project, even if you have added any comment anchor or not.

In that case, it would be helpful to see a notification number, that how many total number of comment anchor we have.

image

Not working with hangul(korean language)

When i use thie with hangul(korean language) highlight is disabled.

For example,

// ANCHOR This is a anchor -> highlight is enabled
// ANCHOR This is a anchor ์ด๊ฒƒ์€ ์•ต์ปค์ž…๋‹ˆ๋‹ค. -> highlight is enabled but just displayed english text in sidebar.
// ANCHOR ์ด๊ฒƒ์€ ์•ต์ปค์ž…๋‹ˆ๋‹ค. -> highlight is disabled.

please check this one.

[Feature request] Add options for hiding tag text and line number ,and customizable font size for side bar

image

Thank you for your great extension. I really like the anchor side bar. But I prefer a small size one and after I resized it to smaller, useful information will be hided. I think the TODO text in this case is not necessary since the color has already indicate its category. The line number is also unnecessary for me since I use the side bar by clicking on an item. So I think these styles should be customizable for users with different needs.

Besides, if the font size for side bar can be smaller or customizable, the side bar can show more information.

Thank you!

[Feature Request] Sidebar Folding and Searchable Anchors in Show All Commands Menu

Hi,

First of all thanks for providing such a great extension. it helps a lot in navigation inside large code.

I have some feature request and also have suggestion to improve an existing one.

1- please add an option\command in Show All Commands menu for parsing file on -demand, a feature which parse file current file only when user want it, after parsing it will show a menu containing all anchors in current files (same as, as extension is now showing in sidebar), so user can navigate through anchors quickly by using built-in search as you type feature. like Bookmarks extension which show bookmarks list when user triggered it by command.

2- please add options in settings which make sidebar anchors optional (for less system resources usage), and also an option with that user can disable auto-parsing of file (file parsing will be triggered by command), these two features are to be used along with above feature number 1.

3- I my opinion region anchors feature needs improvement.

For example I've made structure for my code (specially to use with comment anchors) like this.

  • Division (Region Level 1)
    --- Section (Region Level 2)
    ------- Sub Section (Region Level 3)
    ----------- Feature x
    ----------- Feature y
    ----------- Feature z
    ----------- Function x
    ----------- Function y
    ----------- Function z

when I am using current region feature of extension (as it has not have region level system currently)
it is putting a Division inside another Division in sidebar. (when parsing from file start to end).
So something like this will look awesome. in SIDEBAR (hyphens denoted level of folding):

-Division 1
--- Section 1
------- Sub Section 1
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 2
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 3
----------- Feature x
----------- Feature y
----------- Feature z
--- Section 2
------- Sub Section 1
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 2
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 3
----------- Feature x
----------- Feature y
----------- Feature z
--- Section 3
------- Sub Section 1
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 2
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 3
----------- Feature x
----------- Feature y
----------- Feature z

Same for next division found during file parsing like:

-Division 2
--- Section 1
------- Sub Section 1
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 2
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 3
----------- Feature x
----------- Feature y
----------- Feature z
--- Section 2
------- Sub Section 1
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 2
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 3
----------- Feature x
----------- Feature y
----------- Feature z
--- Section 3
------- Sub Section 1
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 2
----------- Feature x
----------- Feature y
----------- Feature z
------- Sub Section 3
----------- Feature x
----------- Feature y
----------- Feature z

I my opinion this can be done by dividing of IsRegion setting to levels, like IsRegionLvl1, IsRegionLvl2, IsRegionLvl3 and so on. I my case I need only three levels but depending on size of files requirement can go upto five levels.

Advance thanks for your response regarding to above.

Cannot Configire Anchor Tags

I edited my settings.json file to alter the SECTION tag's scope to just the file.

"commentAnchors.tags": [
        {
            "tag": "SECTION",
            "scope": "file",
        }
    ]

Now the SECTION anchor has lost all styling, though still appears in the Workspace Anchors search.
Changing the JSON in an attempt to restore lost styling affects nothing.

"commentAnchors.tags": [
        {
            "tag": "SECTION",
            "scope": "file",
            "iconColor": "red",
            "highlightColor": "#A8C023",
            "styleComment": true,
            "isItalic": true,
            "isBold": true,
            "enabled": true,
        }
    ]

[Feature request] Seperate section for folder

We have a section for file and workspace anchors.

code_2019-01-29_22-39-17

But having a folder anchor will help too, where we can get the list of all the anchors from the active root folder.

In the current scenario, showing all the folders in the workspace section is kinda confusing.

Suggestion: Match including ':'

Hello,

I would like to propose an improvement to your awesome extension.
With the inclusion of the new section anchor, I find there is a problem that I'm having again the same issue as with the todo anchor.

Section is a fairly common word, as well as todo (in spanish), and teams use it in comments without the intention to add an anchor, for example:

* Hay que eliminar todo esto y rehacerlo de nuevo. (spanish)
* This section needs a refactoring

What I propose here would be adding the colon symbol to the anchor matchmaking by default, so only todo:, section:, todo : or section : are matched as anchors.

Thanks

Anchor Regions (Hierarchical anchors)

Allow hierarchical anchor structures by defining anchor regions.

Thoughts:

  • "Region anchors" would act nearly identical to regular anchors, however they will require an end tag
  • Would act like a collapsible list in the sidebar
  • Defined like any other anchor, except they will use an additional boolean property
    • The presence of this property would require another property to define the "end tag"

(Inspired by VS Marketplace Review by Post Bologny)

Hex color for icons?

Right now icon colors are "orange" and "purple", but highlight colors are hex colors. Can we do hex for both for consistency and flexibility?

Cannot set breakpoints on lines with anchor

Cannot set breakpoints on lines with anchor. Breakpoint area is not clickable if an anchor is present in the line. I can set the breakpoint by a shortcut but that breakpoint is not showing up on the left side.

screen shot 2018-10-02 at 9 56 48 pm

isWholeLine

Hello!

You mentioned that you released an update that had this feature in the other issue, but I don't see the option anywhere. Am I just blind?

Bug: custom tag shows double ahcnor icon in gutter

steps

  • in config: ensure gutter icons are shown
  • in config: add a custom tag, e.g. "TEST"
  • in code: add a comment anchor, e.g. //TEST test this new stuff

results

  • anchor is shown on a line (OK)
  • same anchor also shown on the line below it (BUG)

Note that the bug occurs only when there is no space at the end of the comment, so:

  • ok: "//TEST test this new stuff " <--- note the trailing space
  • bug: "//TEST test this new stuff"

[Feature Request] Customizable end Tag

Instead of using ! + TAGNAME, add endTag for user customization. For example,

{
    "tag": "{{{",
    "endTag": "}}}",
    "isRegion": true
}

This is similar to Vim foldmarker

'foldmarker' 'fmr'	string (default: "{{{,}}}")
			local to window
			{not in Vi}
			{not available when compiled without the |+folding|
			feature}
	The start and end marker used when 'foldmethod' is "marker".  There
	must be one comma, which separates the start and end marker.  The
	marker is a literal string (a regular expression would be too slow).
	See |fold-marker|.

Only highlights if there is a character after anchor

The extension seems to only highlight when you have a non-whitespace character after the tag:
image

It also highlights when the tag isn't part of a comment, but I'm not sure if there's an easy way to fix that so I just set matchCase to true.

Edit: It seems to have to be a number, letter, or underscore:
image

Vscode craches when file scanning takes more then 10s

Sinds the latest vscode update (v1.28.0) a extension needs to response within 10s otherwise vscode will assume the extension is somewhat dead and will give a popup extension host terminated unexpectedly for some reason this disables all other extensions and stops a lot of other editor functions.

For a more detailed issue look at this issue: microsoft/vscode#60465

Suggestion: Match upper and lowercase

Hello,

When working with other people, sometimes your coworkers write todos and note comments but the keyword is in lowercase.

If the performance hit for checking both upper and lowercase is not too big, it would be very nice that the TODO: key can be matched with todo: as well.

Ideally, this could be done without adding the lowercase key to the settings, or we could end with a VERY large array of settings in our file if we want to add another key.

Maybe make the commentAnchors.tags.list setting additive instead of replacing the default keys

Disable Sidebar Auto-Folding

I am using comment anchors with nested regions and it works quite fine.
But every time I make changes to a file, the anchor sidebar automatically folds ALL Sub-Sections and only the Sections at the very top are shown which can be really stressful for bigger projects.
So for example my structure looks like this in the sidebar:

โˆจ Top-Section 1
โˆจ Sub-Section 1.1
Sub-Section 1.2
โˆจ Top-Section 2
โˆจ Sub-Section 2.1
Sub-Section 2.2

No I change a line in the respective file, and I automatically get this in the sidebar:

โ‰ป Top-Section 1
โ‰ป Top-Section 2

I didn't even hit 'Save'. It just folds all Sub-Sections and I have to manually re-open them.
Any chance, this behavior can be improved in future releases? A big improvement for example would be to have a 'fold/unfold all anchors' option in the comment anchors sidebar.

The icon's color become the former icon's color

After setting some configuration for the CommentAnchor extension, the icon's color becomes the former icon's color.

You can find the snapshot as the following URL: https://imgur.com/XrBpoiR

My setting is as follows:

 "commentAnchors.tags.list": [{
        "tag": "ANCHOR",
        "iconColor": "default",
        "highlightColor": "#A8C023",
        "scope": "file",
        "styleComment": true,
        "borderStyle": "1px solid #A8C023",
        "borderRadius": 5
        // "backgroundColor": "#49511d"
    },
    {
        "tag": "TODO",
        "iconColor": "blue",
        "highlightColor": "#3ea8ff",
        "scope": "workspace",
        "styleComment": true,
        "borderStyle": "1px solid #23b2ea",
        "borderRadius": 5
    },
    {
        "tag": "FIXME",
        "iconColor": "red",
        "highlightColor": "#F44336",
        "scope": "workspace",
        "styleComment": true,
        "borderStyle": "1px solid #F44336",
        "borderRadius": 5
    },
    {
        "tag": "STUB",
        "iconColor": "purple",
        "highlightColor": "#BA68C8",
        "scope": "file",
        "styleComment": true,
        "borderStyle": "1px solid #BA68C8",
        "borderRadius": 5
    },
    {
        "tag": "NOTE",
        "iconColor": "orange",
        "highlightColor": "#FFB300",
        "scope": "file",
        "styleComment": true,
        "borderStyle": "1px solid #FFB300",
        "borderRadius": 5
    },
    {
        "tag": "REVIEW",
        "iconColor": "green",
        "highlightColor": "#64DD17",
        "scope": "workspace",
        "styleComment": true,
        "borderStyle": "1px solid #64DD17",
        "borderRadius": 5
    },
    {
        "tag": "SECTION",
        "iconColor": "blurple",
        "highlightColor": "#896afc",
        "scope": "workspace",
        "isRegion": true,
        "styleComment": true,
        "borderStyle": "1px solid #896afc",
        "borderRadius": 5
    },
    {
        "tag": "TEST",
        "iconColor": "yellow",
        "highlightColor": "#f4d13d",
        "scope": "workspace",
        "isRegion": true,
        "styleComment": true,
        "borderStyle": "1px solid #f4d13d",
        "borderRadius": 5
    },
    {
        "tag": "PINK",
        "iconColor": "pink",
        "highlightColor": "#e84393",
        "scope": "workspace",
        "isRegion": true,
        "styleComment": true,
        "borderStyle": "1px solid #e84393",
        "borderRadius": 5
    },
    {
        "tag": "EMERALD",
        "iconColor": "emerald",
        "highlightColor": "#2ecc71",
        "scope": "workspace",
        "isRegion": true,
        "styleComment": true,
        "borderStyle": "1px solid #2ecc71",
        "borderRadius": 5
    },
    {
        "tag": "TEAL",
        "iconColor": "teal",
        "highlightColor": "#00cec9",
        "scope": "workspace",
        "isRegion": true,
        "styleComment": true,
        "borderStyle": "1px solid #00cec9",
        "borderRadius": 5
    }
]

How to normally display the icon's color as the succeeding anchor's color?

Cannot fold code in Vue file

if i enable this extension, i cant fold any function or HTML tags by using default folding button which is provided by VScode. The button is disappeared.
it looks like a same bug as issue #13, but this time, it happens in Vue file.

Padding support for anchors with background colors

I love the ability to add backgrounds to the anchors. It makes comments stand out so much better.

I don't like, however, that depending on the font you are using in your VS Code theme, there is no space between the beginning of the anchor background and the first letter. This also applies to the end of the anchor as well.

I tried adding a space to the front of my anchors, but this disabled the ability to close off section anchors (Ex: !Section).

A padding attribute would be an awesome edition. Just Padding-Left and Padding-Right would be perfect.

image

Keep up the awesome work. I absolutely love this plugin!

Feature request: group anchors of same type in sidebar

This is not related to "hierarchical anchors" feature.

The sidebar groups anchors by source file. Each source file show all the anchors within.

It is more useful (in my workflow) to show all anchors of a certain type. For example, it is more interesting for me to see all "TODO" tasks together, regardless of which files they come from. I also added an "UNTESTED" custom anchor, and I'd like to see them grouped together, etc.

This could be an option, to maintain backwards compatibility.

Scroll background

Please can you make this colors optional because I cannot see the any other colors, eslint errors, warnings and other stuff because of it.
image
Actually I can't find this is settings so I believe it's not configurable. So I'd like to see it configurable :)

Thank you in advance!

[ Feature Request ] How can I set break point?

Hi !
I'm sorry that my English is not good.

Now, I'm using comment anchors.
I can't set break point when I want to debug.
When I click the left of the number of line, there's no check of break point.
There's already anchor simbol , so I can't click and set break point.

Is it possible to set break point??

navigation shortcuts

When in editor, can we have navigation shortcuts like alt+up and alt+down?

Further, here is some inspiration, in case you want to become the coolest guy in town :-)

Codebrowser (use v. 4.9, later versions dont support relative indentation)

One can navigate into Sections using alt+right/left!

Background highlighting

Could you please add the ability to highlight label backgrounds? With highlighted backgrounds, label are easier to catch.

Add paths to exclude config option

The exclude config option "commentAnchors.workspace.excludeFiles" has this default:

"**/{node_modules,.git,.idea,target,out,build,vendor}/**/*"

I tried to add .gitignore file:

"**/{node_modules,.git,.idea,target,out,build,vendor}/**/*, .gitignore"

But that doesn't work - it just scans forever.

CPU and RAM usage through the roof

I just uninstalled this extension because it was causing a lot of issues. Today (this did not happen before today, and I had the extension installed for at least a full month), out if nowhere vscode was using 80-90% CPU usage and 4-5 GB of RAM.

After some plugin disabling and troubleshooting, it turns out that its Comment Anchors that was causing this. If the plugin was disabled, vscode behaves normally, if it was enabled, BAM cpu and ram are through the roof.

Relevant specs: 16 GB Ram - i7 6700K 4.6GHz (4 cores - 8 threads)

option to not show on scrollbar

Allow to disable show-on-scrollbar, which clutters the UI and you're not sure if it's a lint error, git change, or an anchor.

image

Unfold when scrolling to anchor

When clicking an anchor in the sidebar to scroll to it, I think the editor should unfold the section and scroll to the anchor.

Here's the current behavior:
fold

Allow disabling some of the tags

I may use the words "note" and "section" in a writing, and so wouldn't want them to be considered "tags". Simply removing them from the tag list doesn't seem to do anything:

    "commentAnchors.tags.list": [
        {
            "tag": "ANCHOR",
            "iconColor": "default",
            "highlightColor": "#A8C023",
            "scope": "file"
        },
        {
            "tag": "TODO",
            "iconColor": "blue",
            "highlightColor": "#3ea8ff",
            "scope": "workspace"
        },
        {
            "tag": "FIXME",
            "iconColor": "red",
            "highlightColor": "#F44336",
            "scope": "workspace"
        },
        {
            "tag": "STUB",
            "iconColor": "purple",
            "highlightColor": "#BA68C8",
            "scope": "file"
        }
    ]

Default exclusion glob pattern

Hi,

Sadly, the default exclusion glob pattern doesn't mention the "node_modules" directory. This caused VS Code to be terribly slow. I checked everything and spent more than an hour to figure out the problem was caused by the extension. Since, in the new versions, the extension looks for anchors throughout the workspace, and sadly, the default file exclusion glob pattern doesn't take "node_modules" directory into account, it had no choice but checking all modules. I fixed this, by updating my exclusion glob pattern like this:
{node_modules,.git,.idea}/**/*

Please update the defaults to save others' time.

Feature request: I want Tag name shows on/off option.

image

FILE ANCHORS nav bar shows tag name.
And I want to recognize what the comment means on nav bar.
But I was used to small width nav bar. So, there are only to showing tag name.
If you make option with tag name on/off, I will recognize comment on short width nav bar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.