Package-level declarations

Types

Link copied to clipboard
data class Action(val name: String, val apply: (EditorSession) -> Unit)

A quick-fix action that can be applied to resolve a diagnostic.

Link copied to clipboard
data class Diagnostic(val from: DocPos, val to: DocPos, val severity: Severity, val message: String, val source: String? = null, val actions: List<Action> = emptyList())

A diagnostic message attached to a range in the document.

Link copied to clipboard
data class LintConfig(val delay: Long = 750, val markerFilter: (diagnostics: List<Diagnostic>) -> List<Diagnostic>? = null, val tooltipFilter: (diagnostics: List<Diagnostic>) -> List<Diagnostic>? = null, val autoPanel: Boolean = false)

Configuration for the linter.

Link copied to clipboard
data class LintGutterConfig(val hoverTime: Long = 300, val markerFilter: (diagnostics: List<Diagnostic>) -> List<Diagnostic>? = null, val tooltipFilter: (diagnostics: List<Diagnostic>) -> List<Diagnostic>? = null)

Configuration for the lint gutter.

Link copied to clipboard

A lint source function that produces diagnostics for the current editor state.

Link copied to clipboard

Severity levels for diagnostics.

Link copied to clipboard

A suspend lint source function for asynchronous linting.

Properties

Link copied to clipboard

Close the lint diagnostics panel.

Link copied to clipboard

Theme color for error-level diagnostics.

Link copied to clipboard

Theme color for hint-level diagnostics.

Link copied to clipboard

Theme color for info-level diagnostics.

Link copied to clipboard

Default lint keymap bindings.

Link copied to clipboard

Theme color for the diagnostic source label in the lint panel.

Link copied to clipboard

Theme color for warning-level diagnostics.

Link copied to clipboard

Jump to the next diagnostic after the cursor.

Link copied to clipboard

Open the lint diagnostics panel.

Link copied to clipboard

Jump to the previous diagnostic before the cursor.

Link copied to clipboard

Effect used to update the set of diagnostics.

Functions

Link copied to clipboard

Get the total number of diagnostics in the given state.

Link copied to clipboard

Force the linter to re-run immediately.

Link copied to clipboard
fun forEachDiagnostic(state: EditorState, callback: (Diagnostic) -> Unit)

Iterate over all diagnostics in the given state.

Link copied to clipboard
fun linter(source: LintSource, config: LintConfig = LintConfig()): Extension

Create a linter extension.

fun linter(source: SuspendLintSource, config: LintConfig = LintConfig()): Extension

Create a linter extension with a suspend source.

Link copied to clipboard
fun lintGutter(config: LintGutterConfig = LintGutterConfig()): Extension

Extension that adds a lint gutter column showing colored markers for lines that have diagnostics.

Link copied to clipboard
fun setDiagnostics(view: EditorSession, diagnostics: List<Diagnostic>)

Set diagnostics on an editor view.