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

fix(defaults): skip rename_basename in document_symbols mapping #1706

Merged
merged 1 commit into from
Mar 1, 2025

Conversation

jeffawang
Copy link
Contributor

This fixes an issue where the document_symbols mode had an invalid mapping from the global map, ie. the ["b"] = "rename_basename" mapping.

The approach is to move the global mapping ["b"] = "rename_basename" mapping to each of the more specific git_status, buffers, and filesystem mappings, where they are valid.

Issue details

When pressing b in the document_symbols tree, I was getting this message:

[Neo-tree WARN] Invalid mapping for  b :  nil

And when pressing ? to see the keymap, I ran into this red error message:

E5108: Error executing lua: ...ng/.local/share/nvim/lazy/nui.nvim/lua/nui/line/init.lua:22: attempt to index local 'block' (a nil value)                                                                                                stack traceback:                                                                                                                                                                                                                                ...ng/.local/share/nvim/lazy/nui.nvim/lua/nui/line/init.lua:22: in function 'append'                                                                                                                                                    .../lazy/neo-tree.nvim/lua/neo-tree/sources/common/help.lua:62: in function 'show'
        ...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:891: in function <...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:888>

@jeffawang jeffawang changed the title fix(defaults): skip rename_basename in document_symbols fix(defaults): skip rename_basename in document_symbols mapping Feb 28, 2025
Copy link
Collaborator

@pynappo pynappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should've caught that earlier, my bad!

@pynappo pynappo merged commit 16854ed into nvim-neo-tree:main Mar 1, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants