LSP: Handle clients that do not support CompletionContext
(cherry picked from commit 0080d6f109d769478b049a0b3621183f8df71776)
This commit is contained in:
committed by
Thaddeus Crews
parent
0762732d4d
commit
98be0bbc32
@@ -1440,7 +1440,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.
|
||||
@@ -1463,8 +1463,11 @@ struct CompletionParams : public TextDocumentPositionParams {
|
||||
|
||||
void load(const Dictionary &p_params) {
|
||||
TextDocumentPositionParams::load(p_params);
|
||||
|
||||
if (p_params.has("context")) {
|
||||
context.load(p_params["context"]);
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary to_json() {
|
||||
Dictionary ctx;
|
||||
|
||||
Reference in New Issue
Block a user