Skip to content

#files prompt does not work without ripgrep #1178

Description

@cst0827

As title, #files prompt currently does not work without ripgrep

If I try to use #files prompt, it report this error in nvim:

[CopilotChat] [ERROR 10:38:55] /(my home dir)/.local/share/nvim/lazy/CopilotChat.nvim/lua/CopilotChat...nvim/lazy/CopilotChat.nvim/lua/CopilotChat/utils.lua:746: attempt to index local 'g' (a nil value)

At the time this error happened, I'm using CopilotChat.nvim installed by lazy.nvim,
the HEAD is at main and commit hash is 55f2162

I'm using nvim version v0.11.2 built from source, this is my :version output

NVIM v0.11.2
Build type: RelWithDebInfo
LuaJIT 2.1.1741730670
Compilation: /usr/bin/cc -O2 -g -flto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always  -DUNIT_TESTING -D_GNU_SOURCE -DINCLUDE_GENERATED_DECLARATIONS -DUTF8PROC_STATIC -I/(my home dir)/neovim/.deps/usr/include/luajit-2.1 -I/(my home dir)/neovim/.deps/usr/include -I/(my home dir)/neovim/build/src/nvim/auto -I/(my home dir)/neovim/build/include -I/(my home dir)/neovim/build/cmake.config -I/(my home dir)/neovim/src -I/usr/include 

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/(my home dir)/neovim/share/nvim"

I'm running this on a Debian 11 VM, within VMWare Workstation 16 Player

Another thing worth mentioning is that I read utils.lua in the error message,
and found out the problem happened in a fallback behavior if ripgrep is not installed,
so I installed ripgrep after that and it worked perfectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions