Skip to content

weird custom action behaviour #1420

Closed
Closed
@vcraescu

Description

@vcraescu

Description

I have the following config:

  view = {
    width = 50,
    hide_root_folder = false,
    side = "left",
    preserve_window_proportions = false,
    mappings = {
      custom_only = false,
      list = {
        {
          key = "fg",
          action = "foobar",
          action_cb = live_grep,
        },
      },
    },
    number = false,
    relativenumber = false,
  },

If the custom action does not contain the word "live" it works as expected but If I changed it to something like live_grep or custom_live_grep etc. the action_cb will not even be invoked. Tried to look at the current implementation but I just can't figure out why I get this behaviour.

Neovim version

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Operating system and version

macOS 12.4

nvim-tree version

6a49a03

Minimal config

-

Steps to reproduce

  view = {
    width = 50,
    hide_root_folder = false,
    side = "left",
    preserve_window_proportions = false,
    mappings = {
      custom_only = false,
      list = {
        {
          key = "fg",
          action = "live_grep",
          action_cb = live_grep,
        },
      },
    },
    number = false,
    relativenumber = false,
  },

Expected behavior

No response

Actual behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions