SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
762 stars 30 forks source link

Error: attempt to index upvalue 'v' (a function value) #57

Closed hopezh closed 1 year ago

hopezh commented 1 year ago

I got the following error message when trying to use h/j/k/l to navigate in navbuddy: image

May I ask what is happening here? and how to fix the issue?

My neovim config is here (link updated on 17-May): nvim_navbuddy.lua.

nikbrunner commented 1 year ago

I get the same error. After I call Navbuddy and try to navigate, it triggers the error.

When I get the error the editor almost freezes, and I can interact, because any key press triggers the error again

image
SmiteshP commented 1 year ago

@hopezh @nikbrunner There was recently a breaking change in how mappings are set. If you were manually setting the mappings in setup, please refer to the README for how to set them now.

SmiteshP commented 1 year ago

@hopezh would have to change it like so

mappings = {
  ["k"] = actions.next_sibling(),
  ["i"] = actions.previous_sibling(),
  ["j"] = actions.parent(),
  ["l"] = actions.children(),
},
nikbrunner commented 1 year ago

Okay, so basically just call every action?

Update: I tried this and now everything is working for me again. :)

Thank you!

hopezh commented 1 year ago

@hopezh would have to change it like so

mappings = {
  ["k"] = actions.next_sibling(),
  ["i"] = actions.previous_sibling(),
  ["j"] = actions.parent(),
  ["l"] = actions.children(),
},

Your suggestion works like a charm. Thank you very much. I'm enjoying with my "navbuddy" now:

image

SmiteshP commented 1 year ago

Closing as resolved