Language Serverという拡張子を作成すると可能です。サイトから:
言語サーバーが通常実装する最初の興味深い機能は、ドキュメントの検証です。その意味では、リンターでさえ言語サーバーとしてカウントされ、VSコードでは通常、リンターは言語サーバーとして実装されます(例については、eslintとjshintを参照)。しかし、言語サーバーには多くのものがあります。コードの完成、すべての参照の検索、または定義への移動が可能です。以下のサンプルコードは、コード補完をサーバーに追加します。単に「TypeScript」と「JavaScript」という2つの単語を提案するだけです。
そして、いくつかのサンプルコード:
// This handler provides the initial list of the completion items.
connection.onCompletion((textDocumentPosition: TextDocumentPositionParams): CompletionItem[] => {
// The pass parameter contains the position of the text document in
// which code complete got requested. For the example we ignore this
// info and always provide the same completion items.
return [
{
label: 'TypeScript',
kind: CompletionItemKind.Text,
data: 1
},
{
label: 'JavaScript',
kind: CompletionItemKind.Text,
data: 2
}
]
});
// This handler resolve additional information for the item selected in
// the completion list.
connection.onCompletionResolve((item: CompletionItem): CompletionItem => {
if (item.data === 1) {
item.detail = 'TypeScript details',
item.documentation = 'TypeScript documentation'
} else if (item.data === 2) {
item.detail = 'JavaScript details',
item.documentation = 'JavaScript documentation'
}
return item;
});