diff --git a/plugin/core/sessions.py b/plugin/core/sessions.py index 3bedb7cbb..635c106a6 100644 --- a/plugin/core/sessions.py +++ b/plugin/core/sessions.py @@ -330,7 +330,7 @@ def get_initialize_params(variables: dict[str, str], workspace_folders: list[Wor "contextSupport": True, "signatureInformation": { "activeParameterSupport": True, - "noActiveParameterSupport": True, + "noActiveParameterSupport": False, "documentationFormat": supported_markup_kinds, "parameterInformation": { "labelOffsetSupport": True diff --git a/plugin/core/signature_help.py b/plugin/core/signature_help.py index 765e0f270..82f8f022f 100644 --- a/plugin/core/signature_help.py +++ b/plugin/core/signature_help.py @@ -1,6 +1,7 @@ from __future__ import annotations +from typing import cast from .logging import debug -from .protocol import SignatureHelp +from .protocol import SignatureHelp, Uint from .protocol import SignatureInformation from .registry import LspTextCommand from .views import FORMAT_MARKUP_CONTENT @@ -168,11 +169,7 @@ def _parameter_documentation(self, view: sublime.View, signature: SignatureInfor if not parameters: return None try: - active_parameter = signature.get("activeParameter") - # @since 3.18 active_parameter can be null - # in which case the client should not higlight parameters - if active_parameter is None: - return + active_parameter = cast(Uint,signature.get("activeParameter")) parameter = parameters[active_parameter or self._active_parameter_index] except IndexError: return None