Skip to content

Commit

Permalink
fix: fix lsp next/prev diagnostics command
Browse files Browse the repository at this point in the history
was not working after addition of setting 'show diagnostics in hover'
  • Loading branch information
HJX-001 committed May 31, 2024
1 parent e017330 commit c37b8c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ def show_hover(self, listener: AbstractViewListener, point: int, only_diagnostic
def _show_hover(self, listener: AbstractViewListener, point: int, only_diagnostics: bool) -> None:
hover_content = self.hover_content()
prefs = userprefs()
diagnostics_content = "" if not prefs.show_diagnostics_in_hover else self.diagnostics_content()
diagnostics_content = ""
if only_diagnostics or prefs.show_diagnostics_in_hover:
diagnostics_content = self.diagnostics_content()
contents = diagnostics_content + hover_content + code_actions_content(self._actions_by_config)
link_content, link_range = self.link_content_and_range()
only_link_content = not bool(contents) and link_range is not None
Expand Down
5 changes: 5 additions & 0 deletions sublime-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@
"default": "annotation",
"markdownDescription": "Where to show `\"code lens\"`."
},
"show_diagnostics_in_hover": {
"type": "boolean",
"default": true,
"markdownDescription": "Show diagnostics in hover popup if available."
},
"show_code_actions_in_hover": {
"type": "boolean",
"default": true,
Expand Down

0 comments on commit c37b8c5

Please sign in to comment.