Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to modify group names ? #50

Closed
rafamadriz opened this issue May 3, 2021 · 2 comments
Closed

Question: How to modify group names ? #50

rafamadriz opened this issue May 3, 2021 · 2 comments

Comments

@rafamadriz
Copy link
Contributor

There's no way I can get the group names to show up. I've already used some examples configs from the README but none of them seen to work for me.

2021-May- 3

As you can see all of the groups that have more keybindings inside only show +prefix. I've basically tried all the methods from the README. This is what I currently have:

local opts = {
    mode = "n", -- NORMAL mode
    prefix = "<leader>",
    buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
    silent = true, -- use `silent` when creating keymaps
    noremap = true, -- use `noremap` when creating keymaps
    nowait = false -- use `nowait` when creating keymaps
}

local mappings = {
    f = {
        name = "file", -- optional group name
        f = {"<cmd>Telescope find_files<cr>", "Find File"} -- create a binding with label
    }
}

local wk = require("which-key")
wk.register(mappings, opts)

Right now I'm testing with <leader>f and I haven't mange to make it show +find as a group name instead of +prefix. Can anyone point me in the right direction ? or tell what am I doing wrong.

@rafamadriz
Copy link
Contributor Author

I forgot to require the file where I was setting up which-key... 🙃

@folke
Copy link
Owner

folke commented May 3, 2021

Ha, glad you got that sorted out 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants