LS: mark LS that support implementation request

This commit is contained in:
Michael Panchenko committed 2026-04-28 12:17:18 +02:00
1 parent 5dd1a41000
commit df0f476614
6 files changed
+26

No files matched your search

@@ -206,6 +206,10 @@ class CSharpLanguageServer(SolidLanguageServer):
scripts. If you have a custom .NET installation, ensure 'dotnet' is available in PATH with version 10 or higher.
"""
@classmethod
def supports_implementation_request(cls) -> bool:
return True
def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):
"""
Creates a CSharpLanguageServer instance. This class is not meant to be instantiated directly.
@@ -152,6 +152,10 @@ class EclipseJDTLS(SolidLanguageServer):
```
"""
@classmethod
def supports_implementation_request(cls) -> bool:
return True
def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):
"""
Creates a new EclipseJDTLS instance initializing the language server settings appropriately.
+4
View File
@@ -23,6 +23,10 @@ class Gopls(SolidLanguageServer):
Provides Go specific instantiation of the LanguageServer class using gopls.
"""
@classmethod
def supports_implementation_request(cls) -> bool:
return True
@override
def is_ignored_dirname(self, dirname: str) -> bool:
# For Go projects, we should ignore:
@@ -26,6 +26,10 @@ class RustAnalyzer(SolidLanguageServer):
Provides Rust specific instantiation of the LanguageServer class. Contains various configurations and settings specific to Rust.
"""
@classmethod
def supports_implementation_request(cls) -> bool:
return True
@staticmethod
def _determine_log_level(line: str) -> int:
"""Classify rust-analyzer stderr output to avoid false-positive errors."""
@@ -67,6 +67,10 @@ class TypeScriptLanguageServer(SolidLanguageServer):
- typescript_language_server_version: Version of typescript-language-server to install (default: "5.1.3")
"""
@classmethod
def supports_implementation_request(cls) -> bool:
return True
# Safety timeout for $/progress-based indexing wait. Normally the event fires
# well within this window; the timeout is only hit if the server never sends progress.
INDEXING_PROGRESS_TIMEOUT = 15.0 if os.name == "nt" else 10.0
+6
View File
@@ -207,6 +207,12 @@ class Language(str, Enum):
case _:
return 2
def supports_implementation_request(self) -> bool:
"""
Return whether the default language server for this language supports ``textDocument/implementation``.
"""
return self.get_ls_class().supports_implementation_request()
def get_source_fn_matcher(self) -> FilenameMatcher:
match self:
case self.PYTHON | self.PYTHON_JEDI | self.PYTHON_TY: