aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/insert.txt3
-rw-r--r--runtime/lua/vim/lsp/util.lua7
2 files changed, 9 insertions, 1 deletions
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index fce4d8628e..e53af5074b 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1083,7 +1083,8 @@ items:
empty when non-zero this match will be added even when it is
an empty string
user_data custom data which is associated with the item and
- available in |v:completed_item|
+ available in |v:completed_item|; it can be any type;
+ defaults to an empty string
All of these except "icase", "equal", "dup" and "empty" must be a string. If
an item does not meet these requirements then an error message is given and
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 7d4dc072e5..68f3b35df3 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -240,6 +240,13 @@ function M.text_document_completion_list_to_complete_items(result, prefix)
icase = 1,
dup = 1,
empty = 1,
+ user_data = {
+ nvim = {
+ lsp = {
+ completion_item = completion_item
+ }
+ }
+ },
})
end