rust-analyzer: Rust Analyzer does not respect VS Code's "files.exclude" setting

When I ctrl+click on a definition, I get 100s of matches because Analyzer is looking in my .history directory, created by the Local History extension for VS Code.

In my VS Code settings, I have:

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

files.exclude is the setting that I’m taken to when I click Rust Analyzer: Exclude Globs => Edit in settings.json, so I believe this is the correct setting.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

For those who have arrived here because of google, this has been renamed to rust-analyzer.files.exclude rust-analyzer.files.excludeDirs (it keeps changing)

@peterjoel thank you for the issue! Might I ask you to try to use the following in your settings.json instead?

{
    "rust-analyzer.excludeGlobs": [".history/**"]
}

I believe VSCode navigated you to the wrong setting… The relevant settings are described here

I see this, but it points to the correct key (rust-analyzer.excludeGlobs):

image

Yep. That’s what I see now. Previously there was only a link to edit the JSON. That’s why I think this is fixed now.