According to the protocol, the server may only respond to textDocument/completion request with snippets (indicated with insertTextFormat == 2) if the client had claimed snippet support in the initial initialize request. However texlab doesn't respect that.
export interface CompletionClientCapabilities {
/**
* The client supports the following `CompletionItem` specific
* capabilities.
*/
completionItem?: {
/**
* Client supports snippets as insert text.
*
* A snippet can define tab stops and placeholders with `$1`, `$2`
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
* the end of the snippet. Placeholders with equal identifiers are
* linked, that is typing in one will update others too.
*/
snippetSupport?: boolean;
}
}
export namespace InsertTextFormat {
export const PlainText = 1;
export const Snippet = 2;
}
export type InsertTextFormat = 1 | 2;
Here are the exchanged messages between texlab and ycmd, which doesn't support snippets:
According to the protocol, the server may only respond to
textDocument/completion
request with snippets (indicated withinsertTextFormat == 2
) if the client had claimed snippet support in the initialinitialize
request. However texlab doesn't respect that.https://microsoft.github.io/language-server-protocol/specification#textDocument_completion
Here are the exchanged messages between texlab and ycmd, which doesn't support snippets:
That completion response ends up causing an assertion error and users see no completions.