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
+ if opt.lspOptions.useBufferCompletion
+ # 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
+ endif
var completeItems: list<dict<any>> = []
for item in items
usePopupInCodeAction: false,
# ShowReferences in a quickfix list instead of a location list`
useQuickfixForLocations: false,
+ # add to autocomplition list current buffer words
+ useBufferCompletion: false,
# Enable support for custom completion kinds
customCompletionKinds: false,
# A dictionary with all completion kinds that you want to customize
command to display the code action for the current
line, use a popup menu instead of echoing.
By default this is set to false.
+ *lsp-opt-useBufferCompletion*
+useBufferCompletion |Boolean| option. If enable adds current buffer words
+ to autocompletion list. Мay degrade vim performance.
+ By default this is set to false.
For example, to disable the automatic placement of signs for the LSP
diagnostic messages, you can add the following line to your .vimrc file: >