-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Option to skip types/filter #4
Comments
I am not inclined to do this as I feel this will add lot of complexity to plugin. If you feel you need this after using navbuddy in lua, I assure you won't feel the need for other languages. Lua lsp is a bit of an outlier and outputs a lot of documentSymbols that you wouldn't really want to see (or even should be considered documentSymbol).
Yep, understandable. I will add an option to disable this behavior in setup function. |
Thanks for fast reply. About filter, here is example code in python: which uses get_filter_kind_map defined in config: |
If the filter were to be implemented, what should happen in the following case? |
Checkout the latest commit, added some source_buffer options to disable following and highlighting. One idea I have for filtering is that I will just let the user provide a function, that takes in the current node (as determined by the navbuddy logic) and should give back a node in return. Navbuddy will start with this returned node in focus. |
I just updated navbuddy and disabled {
"SmiteshP/nvim-navbuddy",
dependencies = { "neovim/nvim-lspconfig", "SmiteshP/nvim-navic", "MunifTanjim/nui.nvim" },
config = function()
require("nvim-navbuddy").setup {
lsp = {
auto_attach = true, -- If set to true, you don't need to manually use attach function
preference = nil -- list of lsp server names in order of preference
},
source_buffer = {
follow_node = false, -- Keep the current node in focus on the source buffer
highlight = false -- Highlight the currently focused node
}
}
end,
}, Filtering by using hook function sound even better than I imagined. I hope u will show at least one or two examples how to use it. |
Can you check now? I had missed updating the setup function. Thats why is wasn't working for you.
Yeah will provide some examples to show how it can be used. However I put this feature little lower in priority, right now will focus on bug fixes and implementing some other simpler features first. |
Works ok great. I guess I/you could close this and open new issue with filter handler? |
Its fine, lets keep this open since the discussion is here. |
I was also thinking about a filter, but in a sense of filtering by name, like fzf. Though as I think about it longer, that's more for a plugin like |
Hi, this is great plugin. I wish for 2 features:
1 option to use only selected types - e.g. in my case I would like to show only: Classes, methods, funcions (hide everything else)
2 option to skip jumping to highlighted entry during navigation (it is bit distracting right now Imo, when whole background buffer changes, when navigating through navbuddy entries, to the one I want to open).
Great plugin.
The text was updated successfully, but these errors were encountered: