Skip to content

Commit c39127d

Browse files
hrsh7thprabirshrestha
authored andcommitted
Improve user_data format (#649)
1 parent f769a45 commit c39127d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

autoload/lsp/omni.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ endfunction
309309
" create item's user_data.
310310
"
311311
function! s:create_user_data(completion_item, server_name) abort
312-
let l:user_data_key = 'vim-lsp/key/' . string(s:managed_user_data_key_base)
312+
let l:user_data_key = '{"vim-lsp/key' . '":"' . string(s:managed_user_data_key_base) . '"}'
313313
let s:managed_user_data_map[l:user_data_key] = {
314314
\ 'server_name': a:server_name,
315315
\ 'completion_item': a:completion_item

test/lsp/omni.vimspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Describe lsp#omni
2222
\ 'empty': 1,
2323
\ 'kind': 'function',
2424
\ 'menu': 'my-detail',
25-
\ 'user_data': 'vim-lsp/key/0'
25+
\ 'user_data': '{"vim-lsp/key":"0"}'
2626
\}
2727

2828
Assert Equals(lsp#omni#get_vim_completion_item(item), want)
@@ -56,7 +56,7 @@ Describe lsp#omni
5656
\ 'empty': 1,
5757
\ 'kind': 'function',
5858
\ 'menu': 'my-detail',
59-
\ 'user_data': 'vim-lsp/key/0'
59+
\ 'user_data': '{"vim-lsp/key":"0"}'
6060
\}
6161

6262
let got = lsp#omni#get_vim_completion_item(item)
@@ -84,7 +84,7 @@ Describe lsp#omni
8484
\ 'empty': 1,
8585
\ 'kind': 'function',
8686
\ 'menu': 'my-detail more-detail',
87-
\ 'user_data': 'vim-lsp/key/0'
87+
\ 'user_data': '{"vim-lsp/key":"0"}'
8888
\}
8989

9090
Assert Equals(lsp#omni#get_vim_completion_item(item), want)

0 commit comments

Comments
 (0)