code/editor/language
import { … } from 'zidane-ui/code/editor'ui/src/code/editor/language.ts
Interfaces#
EditorLanguageInterface#
The language service an EditorColumn talks to; see the module comment.
interface EditorLanguageProperties
| Name | Type | Description |
|---|---|---|
| definition | (path: string, line: number, column: number) => Promise<readonly EditorDefinition[]> | Where the symbol at a 1-based (line, column) is defined, with the symbol's extent when known; empty when unknown. |
| diagnostics | (path: string, listener: (items: readonly EditorDiagnostic[] | null) => void) => () => void | Hears a file's findings ( |
| handles | (path: string) => boolean | Whether it serves this path (by extension, usually). |
| hover | (path: string, line: number, column: number) => Promise<string | null> | Markdown for the symbol at a 1-based (line, column), or |
| name | string | Who checks, for the chip's tooltip ( |
| references | (path: string, line: number, column: number) => Promise<readonly EditorLocation[]> | Every use of the symbol at a 1-based (line, column); empty when unknown. |
| update | (path: string, text: string) => void | An open file's text: on open, then after each burst of edits (debounced by the editor). |
EditorRevealInterface#
A navigation into a file, from a definition or a reference.
interface EditorReveal extends EditorLocationProperties
| Name | Type | Description |
|---|---|---|
columnfrom EditorLocation | number | 1-based column. |
linefrom EditorLocation | number | 1-based line. |
| nonce | number | Bump it to reveal the same location again. |
pathfrom EditorLocation | string | Relative to the editor's root. |