Skip to content

Commit

Permalink
set "noActiveParameterSupport" to False
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Jun 28, 2024
1 parent 3b49862 commit 28bcaf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugin/core/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions plugin/core/signature_help.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 28bcaf6

Please sign in to comment.