'Struct': 's',
'Event': 'E',
'Operator': 'o',
- 'TypeParameter': 'T'
+ 'TypeParameter': 'T',
+ 'Buffer': 'B',
}
# Returns true if omni-completion is enabled for filetype 'ftype'.
'Struct',
'Event',
'Operator',
- 'TypeParameter'
+ 'TypeParameter',
+ 'Buffer'
]
- if kind > 25
+ if kind > 26
return ''
endif
CompletionUltiSnips(prefix, items)
endif
+ # add completion from current buf
+ var words = {}
+ var text = join(getline(1, '$'), "\n")
+ for word in split(text, '\W\+')
+ if !has_key(words, word) && len(word) > 1
+ words[word] = 1
+ items->add({
+ label: word,
+ data: {
+ entryNames: [word],
+ },
+ kind: 26,
+ documentation: "",
+ })
+ endif
+ endfor
+
var completeItems: list<dict<any>> = []
for item in items
var d: dict<any> = {}