Skip to content

Commit 294a1af

Browse files
authored
Add setting to disable signature help popup (#2793)
1 parent 4f50ed4 commit 294a1af

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

LSP.sublime-settings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@
176176
// Show symbol references in Sublime's quick panel instead of the output panel.
177177
"show_references_in_quick_panel": true,
178178

179+
// Show the signature help popup when typing the arguments of a function call.
180+
"show_signature_help": true,
181+
179182
// Show code lenses:
180183
// "annotation" - show code lenses as annotations on the right.
181184
// "phantom" - show code lenses as phantoms between lines.

plugin/core/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ class Settings:
276276
show_multiline_diagnostics_highlights = cast(bool, None)
277277
show_multiline_document_highlights = cast(bool, None)
278278
show_references_in_quick_panel = cast(bool, None)
279+
show_signature_help = cast(bool, None)
279280
show_symbol_action_links = cast(bool, None)
280281
show_view_status = cast(bool, None)
281282

@@ -324,6 +325,7 @@ def r(name: str, default: bool | int | str | list | dict) -> None:
324325
r("show_multiline_diagnostics_highlights", True)
325326
r("show_multiline_document_highlights", True)
326327
r("show_references_in_quick_panel", True)
328+
r("show_signature_help", True)
327329
r("show_symbol_action_links", False)
328330
r("show_view_status", True)
329331

plugin/documents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ def _on_view_updated_async(self) -> None:
10281028
if userprefs().document_highlight_style:
10291029
self._when_selection_remains_stable_async(
10301030
self._do_highlights_async, first_region, after_ms=self.debounce_time)
1031-
if selection := self._stored_selection:
1031+
if userprefs().show_signature_help and (selection := self._stored_selection):
10321032
if self._sighelp:
10331033
self.do_signature_help_async(SignatureHelpTriggerKind.ContentChange)
10341034
else:

sublime-package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,11 @@
634634
"default": false,
635635
"markdownDescription": "Enable semantic highlighting in addition to standard syntax highlighting."
636636
},
637+
"show_signature_help": {
638+
"type": "boolean",
639+
"default": true,
640+
"markdownDescription": "Show the signature help popup when typing the arguments of a function call."
641+
},
637642
"show_code_actions": {
638643
"enum": [
639644
"annotation",

0 commit comments

Comments
 (0)