Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Dec 18, 2022
1 parent c130105 commit 320929b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ def on_workspace_configuration(self, params: Dict, configuration: Any) -> Any:
return view.settings().get(JDTLS_CONFIG_TO_SUBLIME_SETTING[params["section"]], None)
return configuration

def on_settings_changed(self, _) -> None:
# Workaround for https://github.com/eclipse/eclipse.jdt.ls/issues/2365
session = self.weaksession()
if session:
registration_id = "lsp-jdtls-inlayhint-workaround"
capability_path = "inlayHintProvider"
registration_path = capability_path + ".id"
options = {"resolveProvider": False}
session.capabilities.register(registration_id, capability_path, registration_path, options)
for sv in session.session_views_async():
sv.on_capability_added_async(registration_id, capability_path, options)


class LspJdtlsBuildWorkspace(LspJdtlsTextCommand):

Expand Down

0 comments on commit 320929b

Please sign in to comment.