Allow symbol operations in dot-prefixed directories#1203
Open
Asher- wants to merge 1 commit intooraios:mainfrom
Open
Allow symbol operations in dot-prefixed directories#1203Asher- wants to merge 1 commit intooraios:mainfrom
Asher- wants to merge 1 commit intooraios:mainfrom
Conversation
13 tasks
a717f6c to
b2eadf6
Compare
is_ignored_dirname() used dirname.startswith(".") which blanket-ignored
all dot-prefixed directories including .github/, .vscode/, etc.
Changed to only ignore VCS directories (.git, .svn, .hg, .bzr).
Language-specific dot directories (.build, .elixir_ls, .terraform, etc.)
are already handled by the individual LS overrides.
Fixes oraios#1187, fixes oraios#853.
b2eadf6 to
5508d2b
Compare
Contributor
|
@opcode81 and I have already discussed addressing this. Maybe some language-level extensions of ignored dirs will also be needed. We will build off this PR, thanks |
fee8b1c to
d165272
Compare
Contributor
|
@opcode81 reminder for us - build on this and merge it prior to next release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
is_ignored_dirname()in the baseSolidLanguageServerclass returnsdirname.startswith("."), which blanket-ignores all dot-prefixeddirectories. This prevents
find_symbolandget_symbols_overviewfromworking on files inside
.github/,.vscode/, and any other legitimatedot-prefixed directory.
The intent was to skip hidden/internal directories, but the filter is too
broad. Language-specific dot directories (
.build,.elixir_ls,.terraform, etc.) are already handled by individual LS overrides thatcall
super().is_ignored_dirname()— making the base class filterredundant for those cases and harmful for everything else.
Fix
Changed the base
is_ignored_dirname()to only ignore VCS directories(
.git,.svn,.hg,.bzr) which should universally be excluded.All language-specific dot directories continue to be handled by their
respective LS overrides.
Note
This changes the default filter from "all dot-prefixed directories" to
"VCS directories only." Dot-prefixed directories that are listed in
.gitignoreare still filtered by the gitignore-based exclusion at line612. However, un-gitignored dot directories (e.g.
.github/,.vscode/)will now be visible to symbol operations — that is the intent, since those
directories contain legitimate code. If a broader default filter is
preferred, the
_VCS_DIRSset can be extended.Related issues
Fixes #1187, fixes #853.