diff --git a/LSP.sublime-settings b/LSP.sublime-settings index af81d951a..d66ff6629 100644 --- a/LSP.sublime-settings +++ b/LSP.sublime-settings @@ -181,7 +181,7 @@ "show_inlay_hints": false, // Truncate limit for inlay hints. Truncates and adds an ellipsis at the end. - "inlay_truncate_limit": 1000, + "inlay_hints_truncate_limit": 1000, // Highlighting style of "highlights": accentuating nearby text entities that // are related to the one under your cursor. diff --git a/plugin/core/types.py b/plugin/core/types.py index f4717b604..d7c2a09e8 100644 --- a/plugin/core/types.py +++ b/plugin/core/types.py @@ -227,7 +227,7 @@ class Settings: show_code_actions = cast(str, None) show_code_lens = cast(str, None) show_inlay_hints = cast(bool, None) - inlay_truncate_limit = cast(int, None) + inlay_hints_truncate_limit = cast(int, None) show_diagnostics_in_hover = cast(bool, None) show_code_actions_in_hover = cast(bool, None) show_diagnostics_annotations_severity_level = cast(int, None) @@ -273,7 +273,7 @@ def r(name: str, default: bool | int | str | list | dict) -> None: r("show_code_actions", "annotation") r("show_code_lens", "annotation") r("show_inlay_hints", False) - r("inlay_truncate_limit", 1000) + r("inlay_hints_truncate_limit", 1000) r("show_diagnostics_in_hover", True) r("show_code_actions_in_hover", True) r("show_diagnostics_annotations_severity_level", 0) diff --git a/plugin/inlay_hint.py b/plugin/inlay_hint.py index 65ff4fbe2..bc7a99c2b 100644 --- a/plugin/inlay_hint.py +++ b/plugin/inlay_hint.py @@ -97,7 +97,7 @@ def inlay_hint_to_phantom(view: sublime.View, inlay_hint: InlayHint, session: Se def get_inlay_hint_html(view: sublime.View, inlay_hint: InlayHint, session: Session, phantom_uuid: str) -> str: - truncate_limit = view.settings().get("inlay_truncate_limit", userprefs().inlay_truncate_limit) + truncate_limit = view.settings().get("inlay_hints_truncate_limit", userprefs().inlay_hints_truncate_limit) label = format_inlay_hint_label(inlay_hint, session, phantom_uuid, truncate_limit) font = view.settings().get('font_face') or "monospace" html = f""" diff --git a/sublime-package.json b/sublime-package.json index e4b5b5776..79efa3d53 100644 --- a/sublime-package.json +++ b/sublime-package.json @@ -739,7 +739,7 @@ "default": false, "markdownDescription": "Show inlay hints in the editor. Inlay hints are short annotations within the code, which show variable types or parameter names.\nThis is the default value used for new windows but can be overriden per-window using the `LSP: Toggle Inlay Hints` command from the Command Palette, Main Menu or a custom keybinding." }, - "inlay_truncate_limit": { + "inlay_hints_truncate_limit": { "type": "integer", "default": 1000, "minimum": 0,