Closed yw662 closed 1 year ago
Could you post your todo-tree settings? There are settings to exclude specific files/folders so it might be worth trying those.
ripgrep (which the extension uses) honours .gitignore by default so I'm surprised it is picking up an excluded file.
Sadly I can no longer reproduce it :-(
It happens again
{
"todo-tree.highlights.highlightDelay": 0,
"todo-tree.general.tags": [ ],
"todo-tree.general.tagGroups": { },
"todo-tree.general.statusBar": "tags",
"todo-tree.highlights.enabled": true,
"todo-tree.general.showIconsInsteadOfTagsInStatusBar": true,
"todo-tree.highlights.customHighlight": { },
"todo-tree.tree.scanMode": "workspace",
"todo-tree.tree.expanded": true,
"todo-tree.tree.showCountsInTree": true,
"todo-tree.general.showActivityBarBadge": true,
"todo-tree.filtering.ignoreGitSubmodules": true,
"todo-tree.general.enableFileWatcher": true
}
It is a cf pages project using parcel. The command I run when it happens is
wrangler pages dev --proxy NNNN -- parcel --port NNNN --no-autoinstall
It does not happen with "todo-tree.tree.scanMode": "workspace only"
Why do you have "todo-tree.general.tags": [ ]
? Using that with the default regex may have very confusing results because it replaces $TAGS
in the regex with the contents of that setting.
The extension is intended to find things marked 'TODO', etc. What are you expecting it to find with your configuration?
Hmmm no it is not "todo-tree.general.tags": [ ]
, it is a long tag list I am not willing to post here :-).
And the same for tagGroups
.
And the same for customHighlight
.
It is just plain string tags, no empty string, no void values, just things like 'TODO', 'FIXME', 'BUG' and so on, and also 'eslint' and '@ ts', and some other tags.
Are you using the default regex?
This is all the settings so yes.
OK - first thing - set this back to false: "todo-tree.general.enableFileWatcher": false
. It won't be helping and is highly unlikely to be useful.
Can you post an example of a file (or part of a file) with the filename and what you're expecting it to match?
I think disabling todo-tree.general.enableFileWatcher
works.
And an example:
// file: nominal.ts
declare global {
type Nominal<T, name extends string> = T & { __name: name }
type Structural<N extends Nominal<unknown, string>> = Omit<N, '__name'>
}
export function nominal<N extends Nominal<T, string>, T = Structural<N>>(v: T) {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return v as unknown as N
}
Expecting to match: // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
so eslint-disable-next-line
is one of the tags?
The file watcher setting is due to be removed as it causes way more problems than it solves.
Actually no. The tag is eslint
, so it matches all // eslint-*
.
I noticed recently that when I build the project, TODO Tree may list files in build dir and build cache, but they would disappear after I click the refresh button. like this: it is a binary build cache already excluded in gitignore, and it does not seem to contain any search terms.
It does go back to normal after I clicked the refresh button though.