question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore VS Code default exclusions

See original GitHub issue

Hey, I notice that createFileSystemWatcher does not allow for inserting the list of default VS Code exclusions unlike for example findFiles with its exclude argument you can set to undefined to make it use the default built-in excludes. That means currently this extension reports errors from even node_modules and such and in my case that blows some of my projects up to thousands of errors. You might want to consider trying to somehow extract this exclusion list from VS Code and adjusting your glob (either statically or even better dynamically based on the exclusion list) to ignore these.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:32 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
DavidAnsoncommented, May 31, 2018

More FYI, @chrmarti kindly opened an issue for VS Code to look into this: https://github.com/Microsoft/vscode/issues/50874

What we’re seeing may not be entirely expected.

2reactions
DavidAnsoncommented, May 30, 2018

Looking at VS Code on my machine, I see the following behavior (always re-open the folder when testing).

Prevents linting *.md from vendor directory, but hides directory in explorer:

"files.exclude": {
    "**/vendor": true
},

Does not exclude *.md from vendor directory:

"search.exclude": {
    "**/vendor": true
}

Also does not exclude:

"files.watcherExclude": {
    "**/vendor/*/**": true
},

Which brings me back to suggesting markdownlint.ignore.

Prevents linting *.md from vendor directory, no effect on explorer, no effect on Ctrl+T:

"markdownlint.ignore": [
    "vendor/**"
]

Code-wise, I confirm that VS Code’s handling of Ctrl+T is to invoke vscode.workspace.onDidOpenTextDocument for every Markdown document it scans. There is no matching call to vscode.workspace.onDidCloseTextDocument. Either or both may be a bug.

I can’t yet see a way to tell the Ctrl+T scenario apart from the normal document open scenario from the extension’s code.

markdownlint.ignore seems to be the ideal solution for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Choose folders to be ignored during search in VS Code
Temporary Exclusions. From the search function, click the ellipsis to show the files to include and files to exclude text boxes.
Read more >
VS Code Tip of the Week: Exclude Git Ignore
This week's tip is the Exclude Git Ignore user setting. This is a great feature to declutter the tree explorer of VS Code...
Read more >
User and Workspace Settings - Visual Studio Code
You can always reset a setting to the default value by hovering over a setting to ... VS Code will warn you and...
Read more >
Hide or exclude folders and files from search in Visual Studio ...
To edit the file directly, use the shortcut CMD+Shift+P and search for Preferences: Open Keyboard Shortcuts (JSON) . In that file you can...
Read more >
Exclude folders from search in VS Code - DeveloperF1.com
You can exclude files and complete folders from search in VS Code by simply listing unwanted entries in the files to exclude field....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found