linter

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

Create a linter extension with a suspend source.

The source is invoked in a coroutine scope tied to the linter's lifecycle. It is automatically debounced (by LintConfig.delay) and cancelled when the document changes or the editor is destroyed.

Parameters

source

Suspend function that produces diagnostics.

config

Linter configuration.


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

Create a linter extension.

Parameters

source

Function that produces diagnostics for the current view.

config

Linter configuration.