MagicDuck / grug-far.nvim

Find And Replace plugin for neovim
MIT License
658 stars 18 forks source link

Press ENTER or type command to continue #101

Closed LandonSchropp closed 2 months ago

LandonSchropp commented 2 months ago

First of all, thank you for creating this wonderful plugin! The UI is perfect, and I love the philosophy you used when designing it. ⭐

I'm running into a slight problem when using FAR. Every time I type a character into the search field, Neovim pauses with a Press ENTER or type command to continue message.

https://github.com/MagicDuck/grug-far.nvim/assets/361591/95a01b7a-0bdb-4573-a105-a1cc79e20154

I'm using the AstroNvim community configuration for grug-far.nvim. Any thoughts on what might be causing this?

Thanks!

MagicDuck commented 2 months ago

haha, I didn't know they've added it to astro 😄

If you run :messages, does that show anything? According to :help hit-enter, this message shows up when a re-render would hide some message.

Another thing that I've seen stuff about online is this might happen if you have cmdheight=0 https://www.reddit.com/r/neovim/comments/124s68r/press_enter_or_type_command_to_continue_always/

LandonSchropp commented 2 months ago

Good call! Yep, there was something in :messages:

Screenshot 2024-07-11 at 12 46 12 PM

LandonSchropp commented 2 months ago

Astrocommunity is awesome. They keep community-maintained configurations of a bunch of different plugins, so you can easily configure plugins and languages with a single line. For example, this is what my community.lua file looks like:

---@type LazySpec
return {
  "AstroNvim/astrocommunity",
  { import = "astrocommunity.bars-and-lines.dropbar-nvim" },
  { import = "astrocommunity.colorscheme.tokyonight-nvim" },
  { import = "astrocommunity.motion.nvim-surround" },
  { import = "astrocommunity.pack.astro" },
  { import = "astrocommunity.pack.bash" },
  { import = "astrocommunity.pack.docker" },
  { import = "astrocommunity.pack.html-css" },
  { import = "astrocommunity.pack.json" },
  { import = "astrocommunity.pack.lua" },
  { import = "astrocommunity.pack.markdown" },
  { import = "astrocommunity.pack.tailwindcss" },
  { import = "astrocommunity.pack.toml" },
  { import = "astrocommunity.pack.typescript" },
  { import = "astrocommunity.pack.yaml" },
  { import = "astrocommunity.project.grug-far-nvim" },
}

These configurations are maintained, so when things inevitably change I don't have to do anything besides sync Lazy.nvim. 🙂

MagicDuck commented 2 months ago

oh, that's nice! I guess am just to used to my own hand-rolled config now though, haha.

That error looks like something I've seen before. It's likely due to copilot or whatever AI tool. You just need to exclude the grug-far filetypes from it. See https://github.com/MagicDuck/grug-far.nvim/issues/93

Maybe we should add something about it to the README...

LandonSchropp commented 2 months ago

Ah, I didn't even think about Copilot. That did the trick! Thanks for the help. 🙂

For anyone else who might run across this thread, I used this config for Copilot.lua:

return {
  "zbirenbaum/copilot.lua",
  opts = {
    filetypes = {
      ["grug-far"] = false,
      ["grug-far-history"] = false,
    },
  },
}

Edit: Added ["grug-far-history"] = false

MagicDuck commented 2 months ago

might also want to add ["grug-far-history"] = false for the history window