You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the hood, rescript-editor-analysis.exe returns null instead of an object/dict when a completion item has no documentation. This results in multiple errors in rescript#Complete.
A minimal example with vim-plug and the latest versions of vim-rescript and rescript (tested in VIM 8.2 and in Neovim 0.6.1):
Make sure the project is built. Type let my as the last line of Example.res and hit <C-x><C-o> in insert mode. You'll get the following errors twice:
Error detected while processing function rescript#Complete:
line 36:
E121: Undefined variable: value
Press ENTER or type command to continue
Error detected while processing function rescript#Complete:
line 38:
E121: Undefined variable: entry
Press ENTER or type command to continue
Error detected while processing function rescript#Complete:
line 38:
E116: Invalid arguments for function add(l:ret, entry)
Press ENTER or type command to continue
item.documentation is null for undocumented matches.
I tried to replace the offending line with the following, and now omni completion works both for built-in items and for undocumented local items (but I'm no expert in vimscript, so this may be a silly way to do it):
iftype(item.documentation) ==v:t_dictletl:info= item.documentation.value
elseletl:info= item.detail" or some default valueendiflet entry = { 'word': item.label, 'kind': l:kind, 'info': l:info }
The text was updated successfully, but these errors were encountered:
Under the hood,
rescript-editor-analysis.exe
returnsnull
instead of an object/dict when a completion item has no documentation. This results in multiple errors inrescript#Complete
.A minimal example with
vim-plug
and the latest versions ofvim-rescript
andrescript
(tested in VIM 8.2 and in Neovim 0.6.1):~/.vimrc or ~/.config/nvim/init.vim:
Example.res:
Also needed:
Make sure the project is built. Type
let my
as the last line ofExample.res
and hit<C-x><C-o>
in insert mode. You'll get the following errors twice:After hitting ENTER enough times:
I think the problem lies here:
vim-rescript/autoload/rescript.vim
Line 369 in faeeb2d
item.documentation
is null for undocumented matches.I tried to replace the offending line with the following, and now omni completion works both for built-in items and for undocumented local items (but I'm no expert in vimscript, so this may be a silly way to do it):
The text was updated successfully, but these errors were encountered: