Is this a question?
no.
Can this functionality be implemented utilising API?
no.
Is your feature request related to a problem? Please describe.
yes.
I wanted to have a key binding for "disable no_bookmark filter" but there was only toggle_no_bookmark_filter().
Describe the solution you'd like
toggle functions are nice but why not exposing the real on/off functions?
Describe alternatives you've considered
this is the way I'm doing it right now, which is probably fragile and can be broken in the upcoming updates since it's not using the public API
if require("nvim-tree.core").get_explorer().filters.state.no_bookmark then
api.tree.toggle_no_bookmark_filter()
end
I think having toggle_no_bookmark_filter(bool) would be perfect. pass with nil or no argument to toggle, pass true to turn on, pass false to turn off. doesn't break backwards compatibility and doesn't pollute the api much either.
this pattern is present in many parts of the plugin, which is really irritating
Is this a question?
no.
Can this functionality be implemented utilising API?
no.
Is your feature request related to a problem? Please describe.
yes.
I wanted to have a key binding for "disable
no_bookmarkfilter" but there was onlytoggle_no_bookmark_filter().Describe the solution you'd like
toggle functions are nice but why not exposing the real on/off functions?
Describe alternatives you've considered
this is the way I'm doing it right now, which is probably fragile and can be broken in the upcoming updates since it's not using the public API
I think having
toggle_no_bookmark_filter(bool)would be perfect. pass withnilor no argument to toggle, passtrueto turn on, passfalseto turn off. doesn't break backwards compatibility and doesn't pollute the api much either.this pattern is present in many parts of the plugin, which is really irritating