Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown function: go#util#Shellescape #15

Open
edi9999 opened this issue Jun 30, 2022 · 6 comments
Open

Unknown function: go#util#Shellescape #15

edi9999 opened this issue Jun 30, 2022 · 6 comments

Comments

@edi9999
Copy link

edi9999 commented Jun 30, 2022

I get following stacktrace when I open vim in a go file and in insert mode, write :

foo.

(After hitting the dot).

Error detected while processing function pythonx#autoimport[2]..provider#python3#Call:
line   18:
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/edgar/.vim/plugged/vim-pythonx/pythonx/px/langs/go/__init__.py", line 368, in autoimport_at_
cursor
    _DefaultAutoimporter.autoimport_at_cursor()
  File "/home/edgar/.vim/plugged/vim-pythonx/pythonx/px/langs/go/autoimport.py", line 127, in autoimport_a
t_cursor
    info = px.langs.go.gocode_get_info(identifier)
  File "/home/edgar/.vim/plugged/vim-pythonx/pythonx/px/langs/go/__init__.py", line 356, in gocode_get_inf
o
    info = vim.eval("px#go#get_info('"+identifier+"')")
  File "/home/edgar/.local/lib/python3.10/site-packages/pynvim/plugin/script_host.py", line 205, in eval
    obj = self.request("vim_eval", expr)
  File "/home/edgar/.local/lib/python3.10/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/home/edgar/.local/lib/python3.10/site-packages/pynvim/msgpack_rpc/session.py", line 102, in reque
st
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(let):E117: Unknown function: go#util#Shellescape
Press ENTER or type command to continue
@kovetskiy
Copy link
Member

This is probably because vim-go is updated and this function no longer exists there.

@edi9999
Copy link
Author

edi9999 commented Jul 1, 2022

Indeed, it was removed here :

fatih/vim-go@34aeb1d

@sanguis
Copy link

sanguis commented Jul 22, 2022

you can do a temp fix for this by reverting vim-go.

git reset --hard d34c629b852cd4a308606791ca8a809cd8490886

@kovetskiy
Copy link
Member

If you use plug.vim you can also use frozen tag:
https://github.com/junegunn/vim-plug/blob/e300178a0e2fb04b56de8957281837f13ecf0b27/doc/plug.txt#L212

@edi9999
Copy link
Author

edi9999 commented Jul 25, 2022

Thanks, I've fixed it using following line in my .vimrc :

Plug 'fatih/vim-go', { 'commit' : 'd34c629b852cd4a308606791ca8a809cd8490886' }

@kovetskiy
Copy link
Member

Nice, ideally, this function can be moved to vim-pythonx. I am not sure anyone use vim-go nowadays, seems like everyone enjoys coc.nvim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants