package openidea:plugin@1.0.0; /// Editor features a plugin provides for the languages it declares under /// `[[contributes.providers]]` (the host calls only declared kinds). They run /// on the editing path: a result later than ~50 ms is dropped, a call still /// running at 500 ms is interrupted. interface providers { use types.{position, range, text-edit, location}; /// The document a request is about. record document { path: string, language: string, version: u64, text: string, } record completion-item { label: string, detail: option, /// Icon and sort group: text, method, function, constructor, field, /// variable, class, interface, module, property, unit, value, enum, /// keyword, snippet, color, file, reference, folder, enum-member, /// constant, struct, event, operator or type-parameter. Unknown kinds /// show no icon. kind: option, insert-text: string, /// Replaced on accept; `none`: the word at the caret. replace: option, sort-text: option, documentation: option, } record inline-suggestion { insert-text: string, /// Replaced range; `none` inserts at the caret. replace: option, } record file-edit { path: string, edits: list, } record code-action { title: string, /// `quickfix`, `refactor`, … kind: option, preferred: bool, edits: list, } record line-marker { line: u32, /// Gutter icon: `navigate` (default), `implemented`, `implementing`, `run`. icon: option, tooltip: string, /// Opened on click. target: option, } completion: func(doc: document, at: position, trigger: option) -> list; /// Ghost text at the caret (typing replaces an older request: it is cancelled). inline-completion: func(doc: document, at: position) -> option; /// Actions for `selection` (quick fixes for the plugin's own diagnostics). code-actions: func(doc: document, selection: range) -> list; definition: func(doc: document, at: position) -> list; line-markers: func(doc: document) -> list; }