LSP: Handle clients that do not support CompletionContext
This commit is contained in:
parent
d48f9d45e2
commit
0080d6f109
1 changed files with 5 additions and 2 deletions
|
|
@ -1438,7 +1438,7 @@ struct CompletionContext {
|
|||
/**
|
||||
* How the completion was triggered.
|
||||
*/
|
||||
int triggerKind = CompletionTriggerKind::TriggerCharacter;
|
||||
int triggerKind = CompletionTriggerKind::Invoked;
|
||||
|
||||
/**
|
||||
* The trigger character (a single character) that has trigger code complete.
|
||||
|
|
@ -1461,7 +1461,10 @@ struct CompletionParams : public TextDocumentPositionParams {
|
|||
|
||||
void load(const Dictionary &p_params) {
|
||||
TextDocumentPositionParams::load(p_params);
|
||||
context.load(p_params["context"]);
|
||||
|
||||
if (p_params.has("context")) {
|
||||
context.load(p_params["context"]);
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary to_json() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue