vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

Mistyping a plugin name gives a cryptic error

Open adamyakes opened this issue 5 months ago • 2 comments

I recently mistyped the name of a repo/plugin, and when I ran :PlugInstall, I ran into the same cryptic error described in this Stack Overflow issue.

Cloning into 'C:\Users\myusername\AppData\Local\nvim-data\plugged\coc.vim'...
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/neoclide/coc.vim.git/'

Here's my init.lua:

local vim = vim
local Plug = vim.fn['plug#']

vim.call('plug#begin')

Plug('neoclide/coc.vim', { ['branch'] = 'release'})

vim.call('plug#end')

Note, it's supposed to be neoclide/coc.nvim. What's confusing to me is that if I run a regular git clone on with that URL, I get a much more helpful error message:

$ git clone https://github.com/neoclide/coc.vim
Cloning into 'coc.vim'...
remote: Repository not found.
fatal: repository 'https://github.com/neoclide/coc.vim/' not found

Whatever vim-plug does to fetch that repository is producing this different error message. It would be great if vim-plug would either produce the default repository not found error, or otherwise detect the scenario of a plugin not found and report as such.

  • Type:
    • [x] Bug
    • [x] Enhancement
    • [ ] Feature Request
    • [ ] Question
  • OS:
    • [ ] All/Other
    • [ ] Linux
    • [ ] macOS
    • [x] Windows
  • Vim:
    • [ ] Terminal Vim
    • [ ] GVim
    • [x] Neovim

adamyakes avatar Mar 06 '24 15:03 adamyakes