File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -95,11 +95,17 @@ function source:resolve(item, callback)
95
95
local snip = require (' luasnip' ).get_id_snippet (item .data .snip_id )
96
96
97
97
local resolved_item = vim .deepcopy (item )
98
- resolved_item .detail = snip :get_docstring ()
99
- resolved_item .documentation = {
100
- kind = ' markdown' ,
101
- value = table.concat (vim .lsp .util .convert_input_to_markdown_lines (item .data .documentation or ' ' ), ' \n ' ),
102
- }
98
+
99
+ local detail = snip :get_docstring ()
100
+ if type (detail ) == ' table' then detail = table.concat (detail , ' \n ' ) end
101
+ resolved_item .detail = detail
102
+
103
+ if snip .dscr then
104
+ resolved_item .documentation = {
105
+ kind = ' markdown' ,
106
+ value = table.concat (vim .lsp .util .convert_input_to_markdown_lines (snip .dscr ), ' \n ' ),
107
+ }
108
+ end
103
109
104
110
callback (resolved_item )
105
111
end
You can’t perform that action at this time.
0 commit comments