merlin icon indicating copy to clipboard operation
merlin copied to clipboard

omnifunc completion no longer works in vim

Open msprotz opened this issue 4 years ago • 1 comments

Trying to complete an identifier with Ctrl-x Ctrl-o, I get this error:

Error detected while processing function merlin#Complete:
line   38:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
  File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
  File "/home/jonathan/.opam/4.12.0/share/merlin/vim/autoload/merlin.py", line 354, in vim_complete_cursor
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
    completions = command_complete_cursor(base,vim.current.window.cursor)
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
  File "/home/jonathan/.opam/4.12.0/share/merlin/vim/autoload/merlin.py", line 234, in command_complete_cursor
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
    return command2(cmd,track_verbosity=True)
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
  File "/home/jonathan/.opam/4.12.0/share/merlin/vim/autoload/merlin.py", line 173, in command2
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
    result = json.loads(merlin_exec(cmdline,input=content))
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
  File "/home/jonathan/.opam/4.12.0/share/merlin/vim/autoload/merlin.py", line 140, in merlin_exec
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
    vim.buffers[buf].append(errors.split('\n'))
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   38:
vim.error: Vim:E578: Not allowed to change text here
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   42:
E121: Undefined variable: l:compl_succeed
Press ENTER or type command to continue
Error detected while processing function merlin#Complete:
line   43:
E121: Undefined variable: s:compl_dwim
Press ENTER or type command to continue
Pattern not found

any clue what could be causing this? I recently upgraded my setup so I suspect this has something to do with it, but I don't have any ideas to narrow this down... thanks!

Jonathan

msprotz avatar May 03 '21 18:05 msprotz

well, it turned out to be a missing eval $(opam env) in the terminal I started gvim from... wondering if there's any better way to check consistency?

msprotz avatar May 03 '21 18:05 msprotz