Make lint markers non-inclusive again, since having them that way causes more issues than it solves.
The new autoPanel
option can be used to make the panel automatically appear when diagnostics are added and close when no diagnostics are left.
Don't perform an additional superfluous timed lint run after forceLinting
has been called.
The renderMessage
function is now called with the editor view as first argument.
The new hideOn
configuration option can be used to control in what circumstances lint tooltips get hidden by state changes.
Make lint mark decorations inclusive, so that they are applied even if the marked content is replaced by a widget decoration.
linter
can now be called with null as source to only provide a configuration.
markerFilter
and tooltipFilter
function now get passed the current editor state.
Make sure scrolling diagnostic into view in the panel works when the editor is scaled.
Fix a crash that could occur when a view was reconfigured in a way that removed the lint extension.
Diagnostics can now use "hint"
as a severity level.
Diagnostics can now set a markClass
property to add an additional CSS class to the text marked by the diagnostic.
A new previousDiagnostic
command can be used to move back through the active diagnostics.
Make sure lint gutter tooltips are properly closed when the content of their line changes.
The linter
function now eagerly includes all lint-related extensions, rather than appending them to the configuration as-needed, so that turning off linting by clearing the compartment that contains it works properly.
The new needsRefresh
option to linter
makes it possible to cause linting to be recalculated for non-document state changes.
Give lint action buttons a pointer cursor style.
Fix a bug that caused diagnostic action callbacks to be called twice when their button was clicked.
The new forEachDiagnostic
function can be used to iterate over the diagnostics in an editor state.
Update dependencies to 6.0.0
Diagnostic objects may now have a renderMessage
method to render their message to the DOM.
The package now exports the LintSource
function type.
The new markerFilter
and tooltipFilter
options to linter
and lintGutter
allow more control over which diagnostics are visible and which have tooltips.
Hide lint tooltips when the document is changed.
Update dependencies to 0.20.0
Fix a bug where hovering over the icons in the lint gutter would sometimes fail to show a tooltip or show the tooltip for another line.
Make sure the lint gutter tooltips are positioned under their icon, even when the line is wrapped.
Fix an issue where an outdated marker could stick around on the lint gutter after all diagnostics were removed.
Add a hoverTime
option to the lint gutter. Change default hover time to 300
Export a function lintGutter
which returns an extension that installs a gutter marking lines with diagnostics.
The package now exports the effect used to update the diagnostics (setDiagnosticsEffect
).
Fix a bug where reconfiguring the lint source didn't restart linting.
Prevent decorations that cover just a line break from being invisible by showing a widget instead of range for them.
The diagnosticCount
method can now be used to determine whether there are active diagnostics.
Update dependencies to 0.19.0
Fix a crash in the key handler of the lint panel when no diagnostics are available.
Fix an issue that caused openLintPanel
to not actually open the panel when ran before the editor had any lint state loaded.
The package now exports a forceLinting
function that forces pending lint queries to run immediately.
Multiple linter
extensions can now be added to an editor without disrupting each other.
Fix poor layout on lint tooltips due to changes in @codemirror/tooltip.
Fix a regression where using setDiagnostics
when linting hadn't been abled yet ignored the first set of diagnostics.
Newlines in line messages are now shown as line breaks to the user.
You can now pass a delay option to linter
to configure how long it waits before calling the linter.
Adjust to current @codemirror/panel and @codemirror/tooltip interfaces.
Make sure action access keys are discoverable for screen reader users.
Selection in the lint panel should now be properly visible to screen readers.
The package now also exports a CommonJS module.
First numbered release.