diff --git a/plugin/hover.py b/plugin/hover.py index bb8754868..3abb95f92 100644 --- a/plugin/hover.py +++ b/plugin/hover.py @@ -109,7 +109,7 @@ def symbol_actions_content(self, point: int) -> str: if userprefs().show_symbol_action_links: actions = [lk.link(point, self.view) for lk in link_kinds if self.provider_exists(lk)] if actions: - return '

' + " | ".join(actions) + "

" + return '
' + " | ".join(actions) + "
" return "" def diagnostics_content(self) -> str: @@ -120,21 +120,15 @@ def diagnostics_content(self) -> str: for diagnostic in self._diagnostics_by_config[config_name]: by_severity.setdefault(diagnostic.severity, []).append( format_diagnostic_for_html(diagnostic, self._base_dir)) - - for severity, items in by_severity.items(): - formatted.append("
") + for items in by_severity.values(): formatted.extend(items) - formatted.append("
") - if config_name in self._actions_by_config: action_count = len(self._actions_by_config[config_name]) if action_count > 0: href = "{}:{}".format('code-actions', config_name) text = "choose code action ({} available)".format(action_count) formatted.append('
{}
'.format(make_link(href, text))) - formatted.append("") - return "".join(formatted) def hover_content(self) -> str: diff --git a/popups.css b/popups.css index f7df04f5d..6377440bc 100644 --- a/popups.css +++ b/popups.css @@ -1,52 +1,47 @@ .lsp_popup { - margin: 0.5rem 0.5rem 0 0.5rem; + margin: 0.5rem; + font-family: system; } -.lsp_popup .highlight { +.highlight { border-width: 0; border-radius: 0; } -.lsp_popup p { +.diagnostics { margin-bottom: 0.5rem; - padding: 0 0.5rem; - font-family: system; -} -.lsp_popup li { - font-family: system; + font-family: monospace; } -.lsp_popup .diagnostics { - margin-bottom: 0.5rem; -} -.lsp_popup .errors { +.errors { border-width: 0; background-color: color(var(--redish) alpha(0.25)); color: var(--foreground); padding: 0.5rem; } -.lsp_popup .warnings { +.warnings { border-width: 0; background-color: color(var(--yellowish) alpha(0.25)); color: var(--foreground); padding: 0.5rem; } -.lsp_popup .info { +.info { border-width: 0; background-color: color(var(--bluish) alpha(0.25)); color: var(--foreground); padding: 0.5rem; } -.lsp_popup .hints { +.hints { border-width: 0; background-color: color(var(--bluish) alpha(0.25)); color: var(--foreground); padding: 0.5rem; } -.lsp_popup .actions { +.actions { + font-family: system; border-width: 0; background-color: color(var(--foreground) alpha(0.1)); color: var(--foreground); padding: 0.5rem; } -.lsp_popup .actions a.icon { +.actions a.icon { text-decoration: none; } pre.related_info {