Skip to content

Allow symbol operations in dot-prefixed directories#1203

Open
Asher- wants to merge 1 commit intooraios:mainfrom
Asher-:fix/dot-directory-symbol-lookup
Open

Allow symbol operations in dot-prefixed directories#1203
Asher- wants to merge 1 commit intooraios:mainfrom
Asher-:fix/dot-directory-symbol-lookup

Conversation

@Asher-
Copy link
Copy Markdown
Contributor

@Asher- Asher- commented Mar 22, 2026

Problem

is_ignored_dirname() in the base SolidLanguageServer class returns
dirname.startswith("."), which blanket-ignores all dot-prefixed
directories. This prevents find_symbol and get_symbols_overview from
working on files inside .github/, .vscode/, and any other legitimate
dot-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 that
call super().is_ignored_dirname() — making the base class filter
redundant 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
.gitignore are still filtered by the gitignore-based exclusion at line
612. 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_DIRS set can be extended.

Related issues

Fixes #1187, fixes #853.

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.
@Asher- Asher- force-pushed the fix/dot-directory-symbol-lookup branch from b2eadf6 to 5508d2b Compare March 22, 2026 04:43
@MischaPanch
Copy link
Copy Markdown
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

@MischaPanch
Copy link
Copy Markdown
Contributor

@opcode81 reminder for us - build on this and merge it prior to next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants