I have some scripts without sh extension that are marked as "shell scripts" in VSCode but TODO highlighting is not working unless I rename including the sh extension.
You can reproduce this with these steps:
Also the TODOs are listed fine in the tree view, but sometimes I have to hit refresh manually
Could you post your todo-tree settings? When I try this, the TODO is highlighted, but not by the extension, which makes things confusing.
Thanks, these are my settings:
{
"todo-tree.highlights.enabled":true,
"todo-tree.tree.showCountsInTree":true,
"todo-tree.tree.showScanModeButton":true,
"todo-tree.highlights.highlightDelay":200,
"todo-tree.regex.regexCaseSensitive":false,
"todo-tree.highlights.defaultHighlight":{
"type":"line",
"background":"#000",
"foreground":"#0a0"
},
"todo-tree.general.tags":[
"BUG",
"HACK",
"FIXME",
"TODO",
"XXX",
"@TODO"
]
}
Just found out if I enable "todo-tree.filtering.includeHiddenFiles" it works.
If I disable it again it stops working after I reload the file.
I can't reproduce it - it seems to work correctly for me.
What OS are you using? Also, could you have a look in the developer console (Help -> Toggle Developer Tools) and see if there are any errors?
No errors in the console, but I think I found something else.
I tested both in Windows and WSL (via the remote editing feature).
My username in Windows contains a dot… so I tested in another path and found out that it fails when the file is contained in a folder with at least a dot in the name
Could you give me an exact example with username, folder name and file name. I don't have easy access to a windows machine, so it won't be very easy for me to test this unfortunately.
Also, please could you enable todo-tree.general.debug and then post the contents of the debug log from the Output Panel (select Todo Tree from the drop down).
Just in case I spun up a container with a clean environment:
You can reproduce it with:
#!/bin/sh
# TODO test
dir.with.dotsWith the debug log enabled there is no output when there is no highlight
Thats brilliant - thank you. I'll take a look this evening.
OK - I have a fix.
Should be fixed in the latest version. Please let me know if it's working.
Thank you.
It seems not working still with "includeHiddenFiles" disabled. (version v0.0.181)

Hmm. OK - I had to do some rebasing - maybe I lost the change again. I'll see if I can find it.
Doh! Yes, it didn't get included. I'll add it to the next version, which should be pretty soon.
Okay thanks! I will let you know when I test it
OK - latest version (182) should now include the fix. Thanks for your patience!
It's working fine now. Thank you!