Skip to content

Commit

Permalink
Handle non-existent completion item insert text mode capability.
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
  • Loading branch information
rgrunber committed Mar 28, 2024
1 parent df60479 commit c7322be
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,10 @@ public boolean isCompletionItemInsertTextModeSupport(InsertTextMode insertMode)
}

public InsertTextMode getCompletionItemInsertTextModeDefault() {
return capabilities.getTextDocument().getCompletion().getInsertTextMode();
return v3supported
&& capabilities.getTextDocument().getCompletion() != null
? capabilities.getTextDocument().getCompletion().getInsertTextMode()
: null;
}

public boolean isCompletionListItemDefaultsSupport() {
Expand Down

0 comments on commit c7322be

Please sign in to comment.