jremmen / vim-ripgrep

Use RipGrep in Vim and display results in a quickfix list
MIT License
541 stars 99 forks source link

E1208: Complete used without allowing arguments. #63

Closed theathleticnerd closed 2 years ago

theathleticnerd commented 2 years ago

line 149: E1208: -complete used without allowing argumentsPress ENTER or type command to continue I get this error every time I open vim. I tried finding a solution online, but haven't found it yet These are the lines used in my ~/.vimrc if executable('rg') let g;rg_derive_root='true' endif nnoremap ps :Rg

linrongbin16 commented 2 years ago

I have met almost the same error on Windows 10 with Gvim 8.2, rg 13.0.0.

PartyLich commented 2 years ago

Likewise with nvim --version

NVIM v0.6.0-dev+476-gbcc9ba51f
Build type: RelWithDebInfo
LuaJIT 2.0.5

The same issue has appeared with other plugins, seems entirely possible the fix is comparable. Example from coc.vim #3211. My vimscript knowledge is far too poor to have any confidence submitting a pull myself, but hopefully that points someone else in the right direction for a quick fix.

Edit: Oh, this is a duplicate issue, and there's already mention of the same coc fix and an open PR. See #57

alichtman commented 2 years ago

image

This patch works. A PR is already up for it.

f3270 commented 2 years ago

Modifying

command! -complete=file RgRoot :call s:RgShowRoot()

to

command! -nargs=* -complete=file RgRoot :call s:RgShowRoot()

also makes the errro go away ... not sure if its a proper solution.