GithubHelp home page GithubHelp logo

Comments (5)

folke avatar folke commented on May 18, 2024 5

We default to silent=true, but you don;t want that for this keybinding, so set it to false.

i = {":GrepperGit<space>", "Search for something in Git files", silent=false}

from which-key.nvim.

folke avatar folke commented on May 18, 2024

Under the hood, we're just calling vim.api.nvim_set_keymap to set up the keymaps. Not sure what the exact syntax should be for this.

from which-key.nvim.

cideM avatar cideM commented on May 18, 2024

:call nvim_set_keymap('n', '<leader>oo', ':GrepperRg ', {}) works, so this is a problem of which-key it seems

from which-key.nvim.

cideM avatar cideM commented on May 18, 2024

Makes sense, works!

from which-key.nvim.

Mange avatar Mange commented on May 18, 2024

I've had a related issue for soooo long and I can't believe I didn't think about this before.

I had my own helper map function that also defaults silent = true, and that made it so that any mappings I made with it or with register never updated the command line until I made some other edit. I had been suffering under this for weeks.

And to think it was just a matter of adding silent = false to those mappings. 🤦

I'm only commenting here in case someone else made this mistake and to help others if they are searching for this issue.

I had bindings like this:

-- Type "%%" in command line to quickly insert current filename.
-- E.g.
--   :!mv %% $$new_name.txt
-- becomes
--   :!mv path/to/file.txt path/to/new_name.txt
--
map("c", "%%", "<C-R>=expand('%')<cr>", { silent = false }) -- Full path
map("c", "$$", "<C-R>=expand('%:h').'/'<cr>", { silent = false }) -- Dirname
map("c", "^^", "<C-R>=expand('%:t')<cr>", { silent = false }) -- Basename

-- Hide from which key
wk.register({
  ["%%"] = "which_key_ignore",
  ["$$"] = "which_key_ignore",
  ["^^"] = "which_key_ignore",
}, {
  mode = "c",
})

Thank you, everyone!
(Sorry for the notification spam, though.)

from which-key.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.