Fix: Order of ignore patterns passed to language servers was not respected

Resolves #1729
This commit is contained in:
Dominik Jain authored and Dr. Dominik Jain committed 2026-07-21 12:52:53 +02:00
1 parent 9383bf788c
commit a9c72f93e4
3 files changed
+7 -12

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ Status of the `main` branch. Changes prior to the next official version change w
symbolic operations (such as `find_referencing_symbols`) to report stale information.
An explicit file system polling mechanism is now used to detect changes prior to the affected
tool executions.
- Fix: Order of ignore patterns passed to language servers was not respected #1729
- Improve uv-based language server launch command compatibility: Use the more widely supported
`uv tool run` instead of `uv x` #1721
- Java (JDT-LS): add `runtimes` to `ls_specific_settings.java`, a list of extra JRE/JDK entries
+2 -11
View File
@@ -547,17 +547,8 @@ class SolidLanguageServer(ABC):
"""
self.server.on_any_notification(self._observe_server_notification)
# Set up the pathspec matcher for the ignored paths
# for all absolute paths in ignored_paths, convert them to relative paths
processed_patterns = []
for pattern in set(config.ignored_paths):
# Normalize separators (pathspec expects forward slashes)
pattern = pattern.replace(os.path.sep, "/")
processed_patterns.append(pattern)
log.debug(f"Processing {len(processed_patterns)} ignored paths from the config")
# Create a pathspec matcher from the processed patterns
self._ignore_spec = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern, processed_patterns)
# create a pathspec matcher from the given patterns
self._ignore_spec = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern, config.ignored_paths)
self._has_waited_for_cross_file_references = False
+4 -1
View File
@@ -910,7 +910,10 @@ class LanguageServerConfig:
trace_lsp_communication: bool = False
start_independent_lsp_process: bool = True
ignored_paths: list[str] = field(default_factory=list)
"""Paths, dirs or glob-like patterns. The matching will follow the same logic as for .gitignore entries"""
"""
list of ordered ignore patterns (same syntax as .gitignore; only forward slashes) to be used by the language server
for filtering out files and folders from indexing and analysis.
"""
encoding: str = "utf-8"
"""File encoding to use when reading source files"""