atom-languageclient
Version:
Integrate Language Servers with Atom
21 lines (20 loc) • 1.03 kB
TypeScript
import * as ac from "atom/autocomplete-plus";
import { CompletionItem } from "../languageclient";
/** Adds LSP specific properties to the Atom SuggestionBase type */
export interface SuggestionBase extends ac.SuggestionBase {
/**
* A string that is used when filtering and sorting a set of completion items with a prefix present. When `falsy` the
* [displayText](#ac.SuggestionBase.displayText) is used. When no prefix, the `sortText` property is used.
*/
filterText?: string;
/**
* String representing the replacement prefix from the suggestion's custom start point to the original buffer position
* the suggestion was gathered from.
*/
customReplacmentPrefix?: string;
/** Original completion item, if available */
completionItem?: CompletionItem;
}
export declare type TextSuggestion = SuggestionBase & ac.TextSuggestion;
export declare type SnippetSuggestion = SuggestionBase & ac.SnippetSuggestion;
export declare type Suggestion = TextSuggestion | SnippetSuggestion;