Todo-tree: Aggregation in Side Bar no longer working in 0.0.93+

Created on 22 Oct 2018  路  6Comments  路  Source: Gruntfuggly/todo-tree

With the latest versions (0.0.93 and 0.0.94), the results in the side bar are no longer showing up ("Nothing found"). Version 0.0.92 works flawlessly.

Highlighting of tags in editor is working correctly.

When opening a file with TODOs, no results are shown in side bar as well. After modifying the file in editor and saving, the TODOs for that single file are shown in the side bar. When using the refresh button in side bar, the results for that file are gone.

I don't use VS Code workspaces, but a simple folder. Tried creating a workspace file, but that had no effect.

Explicitly setting the root folder to the source code folder "./src" didn't have an effect.

My settings:
json "todo-tree.defaultHighlight": { "foreground": "green", "type": "tag" }, "todo-tree.customHighlight": { "TODO": { "icon": "pin", "foreground": "#67c651" }, "FIXME": { "icon": "tools", "foreground": "#c65151" }, "HACK": { "icon": "issue-opened", "foreground": "#e2e056" } }, "todo-tree.tags": [ "TODO", "FIXME", "HACK" ], "todo-tree.regexCaseSensitive": false, "todo-tree.showInExplorer": false, "todo-tree.expanded": true,

I'm currently on VS Code 1.28.2 (user setup).

I downgraded to 0.0.92 and results are again showing up.

PS: Thanks for that extension @Gruntfuggly - really liking it.

bug fixed

All 6 comments

It sounds like the search is failing. Can you try setting todo-tree.debug: true and then having a look what shows up in the todo-tree output channel?

I don't use workspaces either, but it should still work normally with an 'implicit' workspace. Unfortunately it still shows the workspace folder name - I tried to hide it, but the tree view would break when you added a workspace folder. It's on my list to try and sort out...

Thanks, from debug output channel:

Searching /c:/Workspace/PROJECTFOLDER... Command: "c:\Users\USERNAME\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\vscode-ripgrep\bin\rg.exe" --no-messages --vimgrep -H --column --line-number --color never -i -e "((//|#|<!--|;|/\*|^)\s*(TODO|FIXME|HACK)|^\s*- \[ \])" "/c:/Workspace/PROJECTFOLDER" Found 0 items

"Workspace" is just a folder with all seperate project folders.

When I trigger the "Open file -> Edit -> Save -> TODO of that file shows up" behaviour, the output is simply "Found 1 items" without any command listing.

Oh, and i'm on Windows 10, guess that's worth noting as well.

Edit:
Played with the rg.exe call - looks like the leading "/" at the search location is the problem? I only get results when removing it from the command.
Setting "todo-tree.rootFolder": "${workspaceFolder}" seems to work fine though!

The reason it works for a single file when you save it is that it now just searches the document without using ripgrep (which seemed a bit pointless).

Is the leading '/' coming from your configuration, or from is it being inserted automatically when todo-tree.rootFolder is undefined?

The leading '/' is only present when todo-tree.rootFolder is undefined. When setting todo-tree.rootFolder to an absolute path (e.g. c:/Workspace/PROJECTFOLDER) or to ${workspaceFolder}, the resulting path is correct and the ripgrep search works correctly.
So i guess it has to do with the logic of building the workspace path, probably the difference between Linux/OSX paths starting with '/' and Windows paths starting with drive letter.

Found it - was using the wrong attribute for the workspace paths. Only affected Windows unfortunately. The latest version should now work as expected.

Hey @Gruntfuggly can confirm that it works again with undefined rootFolder, thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitjson picture bitjson  路  7Comments

luqiudi picture luqiudi  路  9Comments

emanuelenardi picture emanuelenardi  路  3Comments

alystair picture alystair  路  9Comments

Cloud7050 picture Cloud7050  路  9Comments