Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.44k stars 139 forks source link

Possible to group tags? #623

Open pepeu93 opened 2 years ago

pepeu93 commented 2 years ago

Is possible to create a group and a subgroup and customize the icon/color of each tag?

Example:

Country
   |
    ---- Age
    ---- Name
      |
       ---- City

Country is the main groups Age Name are subgroups

I was reading the docs and see that is possible to create groups. I tried:

    "todo-tree.general.tagGroups": {
        "Names": [
            "#aaa",
            "#bbb",
        ]
    },

    "todo-tree.highlights.customHighlight": {
        "#aaa": {
            "icon": "fold",
            "iconColour": "red",
            //"gutterIcon": "false",
            "type": "tag",
            "foreground": "00000000",
            "background": "00000000",
        },
        "#bbb": {
            "icon": "three-bars",
            "iconColour": "red",
            //"gutterIcon": "false",
            "type": "tag",
            "foreground": "00000000",
            "background": "00000000",
        },
    },

But the settings don't apply to the group child.

Gruntfuggly commented 2 years ago

It may be that tag groups don't work quite as you're expecting. They're really just aliases, so that you can define settings for multiple tags at the same time, and when using the "group by tag" view, the tags are included in the same group.

I'm not sure what exactly you're trying to achieve. The custom highlight should still apply to each tag. It may just be that you haven't included all the tags in the tags list (todo-tree.general.tags)?

pepeu93 commented 2 years ago

Could I request two things, please?

1- Possible to add support to subgroups?

    "todo-tree.general.tagGroups": {
        "Colors": {
            "Red": [
                "abc",
                "def",
            ],
           "Blue": [
                "abc",
                "def",
            ],
        }
    }

Colors (1) would be the main group, Red/Blue (2) are subgroups. They would look like this: NVIDIA_Share_E5nbwc4kuf

If possible also setting an icon to Colors and another to each subgroup would be great!

2- An option to show the entire text in the sidebar?

By default it crops the text case there's not enough space to display it:

a

I'm suggesting an option to case true, wrap the text and fully display it according to the current sidebar size: b

Also, a question: i was searching for how to add custom icons on vscode, I've found this article: https://medium.com/@chih.hsi.chen/how-to-add-your-custom-icons-to-vscode-icons-9ab8c3f9abc1

is possible somehow make use of these custom icons in the sidebar panel? (i mean that icon in the first picture, before the word Colors).

Miko321 commented 2 years ago

+1 for group/subgroups @Gruntfuggly

@pepeu93 have you tried creating two groups and setting the second group inside of the first? Im not on my PC right now, so i cant test, but i mean maybe this:

"todo-tree.general.tags": [
    "@Test",
    "@Test2",
],

"todo-tree.general.tagGroups": {
    "@Test": [
        "abc",
        "@Test2",
    ],
    "@Test2": [
        "def",
    ],
},
pepeu93 commented 2 years ago

I tried, sadly this didn't work :(