Ambiguous use of user-defined command' error on specifically windows #25
Comments
I momentarily faced the same issue on arch linux upon installation. It weirdly disappeared after a while. Still don't know what caused and fixed the issue. |
Could you run |
@jellydn @umutondersu First, :healthcheck showed I was missing pynvim. I then ran :UpdateRemotePlugins and got errors telling me some modules were missing: python-dotenv, chardet, and prompt-toolkit. (Obviously, I had to run it multiple times until all dependencies were met; each run only revealed one missing dependency) |
I was running into the same issue. I realized I forgot to run :UpdateRemotePlugins before restarting. So it's working for me now. |
This is the output
Which is weird because I already have pynvim installed anu used UpdateRemotePlugins. I'm investigating the reason. |
Thanks @umutondersu I think you got the same issue with @nolanking90 You should install pip install python-dotenv requests pynvim==0.5.0 prompt-toolkit |
Thanks for the fast reply. I have run this command before my installation, so I do not think this is the issue. I have tried to run it again with the force flag but the result is still the same. For reference this is my pip show pynvim output.
|
I have the same issue, I have python installed, neovim finds my python installation, I have pynvim installed as well. I get a: Warning Python 3 is required from the checkHealth of this plugin but later on it says python works fine. |
Hi all, There are two new commands from @ziontee113 on canary Could you take a try and let us know if any issue? |
I have tried the canary branch but the problem still persists. |
Same for me |
FYI - There is a similar issue which was closed by the user due to his config. #38 Make sure that you do the following after installing the plugin.
|
Should the plugin work with |
I am not sure as I didn't use Plug but I guess it should work. You might refer to this commit to get the idea with Plug jellydn/lazy-nvim-ide@5128bc3 |
oh, this issue is not solved It still happens on windows. I tried to write a python file for testing. It seems that: the UpdateRemotePlugins command cannot recognize the python plug-in under windows, and the python plug-in registration result is empty. |
I'm seeing this issue on linux too, I have all of the pip dependencies installed and the :UpdateRemotePlugins command returns:
:checkhealth CopilotChat I've tried this with both copilot.lua and copilot.vim. (edit: and tried both main and canary branches, as well as reverting to a previous commit from early January) |
Do you restart Neovim after run the update remote plug-in command? |
@jellydn yes, multiple times - no luck. |
Could you share with me the output from |
Thanks for taking a look! |
Hi all, I've marked this as cc @gptlang How about you? |
I'm a Linux user. Don't have Windows available to test. |
I'm seeing this issue on linux too (red hat 9), though - so I don't believe this is windows specific. What version of python are you all running the backend with?
|
Just FYI
|
I don’t know if it can be modified to a plugin like leaderf that does not require rplugin. |
python : |
A user faced a similar issue; here is how he fixed it. #43 (comment) I think this is a common issue so I've added to readme the usage, installation, etc but might be not enough. Any suggestions? |
Has no effect on windows |
No effect on my linux instance either |
Wow, how about this? #45 (comment) |
I'm also running into this. I had a couple things run with my install
With these changes, my checkhealth is all green (exactly the same as #25 (comment)) but I am still getting an ambiguous error. I'm willing to provide help in any way I can |
btw from the initial error message: https://superuser.com/questions/1322471/vim-e464-ambiguous-use-of-user-defined-command Are there multiple commands being registered for the same thing? |
For me, CopilotChat is not registered at all. Here is everything in my command list related to copilot
|
@waynebowie99 Looks like the Python script didn't get loaded. This is what mine looks like:
Did you It should look something like this: " python3 plugins
call remote#host#RegisterPlugin('python3', '~/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/copilot-agent.py', [
\ {'sync': v:false, 'name': 'CopilotChatVsplit', 'type': 'command', 'opts': {'nargs': '1'}},
\ {'sync': v:false, 'name': 'CopilotChatVsplitVisual', 'type': 'command', 'opts': {'nargs': '1', 'range': ''}},
\ {'sync': v:false, 'name': 'CopilotChatInPlace', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:false, 'name': 'CopilotChatAutocmd', 'type': 'command', 'opts': {'nargs': '*'}},
\ {'sync': v:false, 'name': 'CopilotChatMapping', 'type': 'command', 'opts': {'nargs': '*'}},
\ ])
call remote#host#RegisterPlugin('python3', '~/.local/share/nvim/lazy/CopilotChat.nvim/rplugin/python3/copilot-plugin.py', [
\ {'sync': v:false, 'name': 'CopilotChat', 'type': 'command', 'opts': {'nargs': '1'}},
\ ]) |
I have been trying to get this working on osx for the past 2 hours, tried everything restarted neovim / OS multiple times but still getting "Ambiguous use of user-defined command error" |
ok I think I have the same issue with @waynebowie99 of CopilotChat not registered in command this is my
Update: still no go, I guess I'll stop for now and try again in the future, still, thanks for the plugin |
omg it's working now, turns out my hope this helps someone else! |
That's why I pinned 2 other issues. NVChad maintainer also left comment there. #38 (comment) |
i completely missed out that other pinned thread, thanks anyways! great plugin! |
Describe the bug
I get the error I mention at the end of the description when I use any of the commands given the Readme. I believe it is only a windows error as in my Ubuntu WSL I have not received this error.
Error executing Lua callback: vim/_editor.lua:341: nvim_exec2(): Vim:E464: Ambiguous use of user-defined command: CopilotChat Explain how it works.
stack traceback:
[C]: in function 'nvim_exec2'
vim/_editor.lua:341: in function 'cmd'
...nvim-data/lazy/CopilotChat.nvim/lua/CopilotChat/init.lua:23: in function <...nvim-data/lazy/CopilotChat.nvim/lua/CopilotChat/init.lua:22>
Reproduction
Use the config given in the usage section on Windows. Try any command or keybindings.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: