diff --git a/src/solidlsp/ls.py b/src/solidlsp/ls.py index 189ed397..5ebdd6e0 100644 --- a/src/solidlsp/ls.py +++ b/src/solidlsp/ls.py @@ -638,9 +638,8 @@ class SolidLanguageServer(ABC): repository_root_path = os.path.abspath(repository_root_path) ls_class = config.code_language.get_ls_class() - # For now, we assume that all language server implementations have the same signature of the constructor - # (which, unfortunately, differs from the signature of the base class). - # If this assumption is ever violated, we need branching logic here. + # All language server implementations are required to use the same signature of the constructor + # (which differs from the signature of the base class constructor). ls = ls_class(config, repository_root_path, solidlsp_settings) ls.set_request_timeout(timeout) return ls diff --git a/src/solidlsp/ls_config.py b/src/solidlsp/ls_config.py index c666a2df..4ac6c844 100644 --- a/src/solidlsp/ls_config.py +++ b/src/solidlsp/ls_config.py @@ -834,10 +834,13 @@ class Language(str, Enum): @dataclass(frozen=True) class LanguageServerConfig: """ - Configuration parameters + Configuration parameters for a language server instance """ code_language: Language + """ + defines the language server to use + """ workspace_folders: list[str] = field(default_factory=lambda: ["."]) """ list of workspace folders to be used by the language server and to be fully indexed by SolidLSP. diff --git a/src/solidlsp/settings.py b/src/solidlsp/settings.py index 8d033d80..373f5d2f 100644 --- a/src/solidlsp/settings.py +++ b/src/solidlsp/settings.py @@ -18,6 +18,12 @@ log = logging.getLogger(__name__) @dataclass class SolidLSPSettings: + """ + Configures SolidLSP-specific data storage as well as global settings. + + Note: Server instance-specific settings belong in LanguageServerConfig, not here. + """ + solidlsp_dir: str = str(pathlib.Path.home() / ".solidlsp") """ Path to the directory in which to store global Solid-LSP data (which is not project-specific) @@ -34,13 +40,6 @@ class SolidLSPSettings: Have a look at the docstring of the constructors of the corresponding LS implementations within solidlsp to see which options are available. No documentation on options means no options are available. """ - additional_workspace_folders: list[str] = field(default_factory=list) - """ - Additional workspace folder paths for cross-package reference support. - Paths can be absolute or relative to the project root. Each folder is added as a workspace - folder in the LSP initialization, enabling language servers to discover symbols and references - across package boundaries (e.g. in monorepos). - """ def __post_init__(self) -> None: os.makedirs(str(self.solidlsp_dir), exist_ok=True)