Closed fredrikaverpil closed 4 months ago
HI Frederik, thank you for the kind words and detailed info! 😄
That error message makes me suspicious that a language server is trying to attach to the buffer, but there is no backing file for it naturally.
If you run :LspInfo
while in the grug-far.nvim buffer, do you see any language server attached?
could also be copilot / other AI related if you use that... (saw similar error in this emacs issue: https://github.com/copilot-emacs/copilot.el/issues/171)
If you use something like https://github.com/zbirenbaum/copilot.lua?tab=readme-ov-file#setup-and-configuration you can exclude the grug-far's filetypes (see https://github.com/MagicDuck/grug-far.nvim?tab=readme-ov-file#filetype)
Ah yes, that was it - thank you!
I have copilot.lua
activated for public git repos, and I don't see this error in the non-public ones. 😄
I just noticed this didn't work well in Lua as it doesn't like the dash:
filetypes = {
grug-far = false,
grug-far-history = false,
}
I worked around it with opts.filetypes["grug-far"] = false
. With this, no more rpc errors! 👍
Thanks again so much for the support and your work on the plugin! ⭐
@fredrikaverpil glad that worked! 😄 Btw, small tip, I believe this should work if you want to add the filetypes config inline:
filetypes = {
["grug-far"] = false,
["grug-far-history"] = false,
}
Awesome, thank you @MagicDuck, I didn't know this! 👍
Hey @MagicDuck and thanks for this fantastic plugin! 👏 😄 I've always struggled a bit with nvim-spectre in terms of how you have to mix filters and flags, and your UI and keymaps just makes everything so much more intuitive to me. Instant replacement here! ⭐
I am however getting an RPC error for each character I type into the search field. This is me typing in
hello
into the search field:My current working directory is
/Users/fredrik/code/dotfiles
and it feels like grug-far is expecting (or looking for) a file in this location, matching the patternGrug FAR - 1: <search term>
.This doesn't appear to affect functionality other than being annoying (as I get popups about this).
System:
rg version