endif
d.user_data = item
+
+ # Condense completion menu items to single words (plus kind)
+ # Move all additional details to the info popup
+ # Caveat: LazyDoc will override moved details!
+ if lspOpts.condensedCompletionMenu
+ const SEP = (s) => empty(s) ? "" : "\n- - -\n"
+ var infoText = ''
+ if d->has_key('abbr') && len(d.abbr) > len(d.word)
+ infoText ..= SEP(infoText) .. ' ' .. d.abbr
+ d.abbr = d.word
+ endif
+ if d->has_key('menu') && !empty(d.menu)
+ infoText ..= SEP(infoText) .. ' ' .. d.menu
+ d.menu = ''
+ endif
+ if !lspserver.completionLazyDoc && !empty(infoText)
+ d.info = infoText .. (d->has_key('info') ? SEP(infoText) .. d.info : '')
+ endif
+ endif
+
completeItems->add(d)
endfor
# Filter duplicate completion items
filterCompletionDuplicates: false,
+
+ # Condenses the completion menu items to single (key-)words (plus kind)
+ condensedCompletionMenu: false,
}
# set the LSP plugin options from the user provided option values
items sent from the server will be filtered to only
include one instance of the duplicates.
+ *lsp-opt-condensedCompletionMenu*
+condensedCompletionMenu |Boolean| option. If enabled, minimizes completion
+ menu items to single (key-) words (plus kind).
+ Moves all additional details to info popup.
+ Caveat: LazyDoc will override moved details!
+
For example, to disable the automatic placement of signs for the LSP
diagnostic messages, you can add the following line to your .vimrc file: >