Closed Nacho114 closed 1 year ago
Hi, you need to wrap the reach.buffers(options)
call in another function:
vim.keymap.set('n', '<leader>rb', function() require('reach').buffers(options) end, {})
Otherwise, it runs immediately and returns nil
as expected.
Ah thanks!
Could do a PR to include this example in the README (similar to the Telescope docs), let me know if you think it would be a good idea (I think it might help others who are just starting out with lua style vim config scripting).
Sure, go ahead.
Hi,
I am new to lua based config, so this is probably trivial if you do know it, but how do I run ReachOpen buffers with options (i.e. custom config)?
:ReachOpen buffers
, works as intended, I also added my on options as shown in the Readme (which does not change the behavior of ReachOpen buffers, which is expected from the doc).But how do I run ReachOpen buffers with my options?
I tried something like this:
vim.keymap.set('n', '<leader>rb', require('reach').buffers(options), {})
but I get a RHS nil error, so I guess this is not how it is intended. If you could tell me how to call it that would be great!
Love the plugin otherwise!