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

Warning when setting a which_key option: "No name available for anonymous functions" #3033

Closed
mihaifm opened this issue Apr 7, 2024 · 0 comments · Fixed by #3044
Closed
Labels
bug Something isn't working reproducible Bug that can be reproduced.

Comments

@mihaifm
Copy link

mihaifm commented Apr 7, 2024

Description

Hi and thanks for the plugin.

I'm getting a warning when trying to set some options for the telescope which_key menu, just by copying the example in :help telescope.actions.generate

  require("telescope").setup {
    defaults = {
      mappings = {
        n = {
          ["?"] = action_generate.which_key {
            name_width = 20, -- typically leads to smaller floats
            max_height = 0.5, -- increase potential maximum height
            separator = " > ", -- change sep between mode, keybind, and name
            close_with_action = false, -- do not close float on action
          },
        },
      },
    },
  }

Following warning is shown:
[telescope.actions.which_key]: No name available for anonymous functions.

Also the ? key now shows up in the menu, as <anonymous>

n > ?       > <anonymous>

It's a minor issue but it's nice if it were fixed.

thanks

Neovim version

.

Operating system and version

.

Telescope version / branch / rev

.

checkhealth telescope

.

Steps to reproduce

.

Expected behavior

.

Actual behavior

.

Minimal config

.
@mihaifm mihaifm added the bug Something isn't working label Apr 7, 2024
@jamestrew jamestrew added the reproducible Bug that can be reproduced. label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproducible Bug that can be reproduced.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants