SolidLanguageServer: Improve docstrings [skip ci]

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-04-29 16:31:25 +02:00
1 parent 842d5b9374
commit 28c2866bf4
1 file changed
+10 -4
+10 -4
View File
@@ -487,10 +487,14 @@ class SolidLanguageServer(ABC):
:param config: the global SolidLSP configuration.
:param repository_root_path: the root path of the repository.
:param process_launch_info: (DEPRECATED - implement _create_dependency_provider instead)
:param process_launch_info: (DEPRECATED: pass None and implement _create_dependency_provider instead)
the command used to start the actual language server.
The command must pass appropriate flags to the binary, so that it runs in the stdio mode,
as opposed to HTTP, TCP modes supported by some language servers.
:param language_id: The language identifier which will be passed to the language server in the `textDocument/didOpen`
notification by default.
If the language server uses multiple language identifiers, it must override the method `get_language_id_for_file`
to provide the appropriate identifier for each type of file.
:param cache_version_raw_document_symbols: the version, for caching, of the raw document symbols coming
from this specific language server. This should be incremented by subclasses calling this constructor
whenever the format of the raw document symbols changes (typically because the language server
@@ -729,10 +733,12 @@ class SolidLanguageServer(ABC):
pass
def _get_language_id_for_file(self, relative_file_path: str) -> str:
"""Return the language ID for a file.
"""
Determines the language identifier to pass to the language server for the given file,
particularly `textDocument/didOpen` requests.
Override in subclasses to return file-specific language IDs.
Default implementation returns self.language_id.
Override this method in subclasses to return file-specific language identifiers.
The default implementation returns the main identifier passed at construction (self.language_id).
"""
return self.language_id