Run notifications in background to hide latency

This commit is contained in:
Zachary Yedidia
2020-08-10 22:49:29 -04:00
parent c344f1bfce
commit f0b1158ab6
5 changed files with 34 additions and 23 deletions

View File

@@ -227,7 +227,7 @@ func LSPComplete(b *Buffer) ([]string, []string) {
for i, item := range items {
suggestions[i] = item.Label
if len(item.TextEdit.NewText) > 0 {
if item.TextEdit != nil && len(item.TextEdit.NewText) > 0 {
completions[i] = util.SliceEndStr(item.TextEdit.NewText, c.X-argstart)
} else if len(item.InsertText) > 0 {
completions[i] = util.SliceEndStr(item.InsertText, c.X-argstart)