Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make rust-analyzer.files.excludeDirs work, actually #18998

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChayimFriedman2
Copy link
Contributor

I have no idea what the original writer of the code thought (CC @matklad, I don't expect you to remember but it was you), but the logic just seems backwards. We should not exclude a file/directory if it is equal to an include! This also meant that we had to add a root == path check so this stuff will actually work, which in turn meant excludes (of root files) no longer worked...

Also rename if to rust-analyzer.files.exclude, because it can exclude files as well.

Fixes #14734.

I have no idea what the original writer of the code thought (CC @matklad, I don't expect you to remember but it was you), but the logic just seems backwards. We should not exclude a file/directory if it is equal to an include! This also meant that we had to add a `root == path` check so this stuff will actually work, which in turn meant excludes (of root files) no longer worked...

Also rename if to `rust-analyzer.files.exclude`, because it can exclude files as well.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 21, 2025
@ChayimFriedman2 ChayimFriedman2 marked this pull request as draft January 21, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rust-analyzer.files.excludeDirs is (still) not working
2 participants