mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-25 00:03:08 +00:00
feat(plugins): a host-owned diagnostics snapshot and line-end annotation order (#3103)
Plugins read problems from a host-owned snapshot that records every Diagnostics event per file and producer, instead of the UI-reported Problems reports, so what a plugin sees no longer depends on window lifetime or the invoking window. Adds the problems-changed workbench event (plugin API 1.8.0, gated at needs_api 8), editor focus events for files of other windows, severity style previews in plugin settings, and lays plugin annotations on the line-end chain before code-vision hints and inline blame. Components and fixtures are rebuilt for API 1.8.0. Co-authored-by: muutot <92625353+muutot@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,12 @@
|
||||
.info {
|
||||
text-decoration: underline dotted var(--info);
|
||||
}
|
||||
.typo {
|
||||
text-decoration: underline wavy var(--wave-typo, var(--success));
|
||||
}
|
||||
.weak {
|
||||
color: var(--fg-weak-warning);
|
||||
}
|
||||
.underline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -32,8 +38,55 @@
|
||||
.muted {
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
/* A zero-width anchor at the line end with the message in an absolutely positioned inner box,
|
||||
the way the code-vision hint is drawn: the annotation takes no part in the line's flow, so it
|
||||
neither stretches the line nor moves the caret at the line end. The message's own offset is a
|
||||
custom property: the blame steps past the message by measuring this inner box plus that
|
||||
offset (inlineBlame.ts). */
|
||||
.after {
|
||||
--openidea-message-offset: var(--space-2);
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
user-select: none;
|
||||
}
|
||||
.afterInner {
|
||||
position: absolute;
|
||||
left: var(--openidea-message-offset);
|
||||
bottom: -2px;
|
||||
white-space: pre;
|
||||
margin-inline-start: calc(var(--space-2) / 2);
|
||||
color: var(--fg-muted);
|
||||
/* No width cap and no overflow: a descender (g, y, p) would be clipped by a
|
||||
line-height-1 box, and a long message simply runs past the editor's edge,
|
||||
where the scroller clips it — the way IDEA paints line-end inlays. */
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* Inline text follows the scheme's Error / Warning colours, the way Inspection Lens
|
||||
colours an annotation. The message span carries the severity class, and the line-end
|
||||
text itself is never underlined: the wave belongs to the code token. */
|
||||
.after .error {
|
||||
color: var(--wave-error);
|
||||
text-decoration: none;
|
||||
}
|
||||
.after .warning {
|
||||
color: var(--wave-warning);
|
||||
text-decoration: none;
|
||||
}
|
||||
.after .info {
|
||||
color: var(--info, var(--fg-weak-warning));
|
||||
text-decoration: none;
|
||||
}
|
||||
.after .typo {
|
||||
color: var(--wave-typo, var(--success));
|
||||
text-decoration: none;
|
||||
}
|
||||
.after .weak {
|
||||
color: var(--fg-weak-warning);
|
||||
text-decoration: none;
|
||||
}
|
||||
.after .underline,
|
||||
.after .strikethrough {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user