Fix backlink handling and improve item selection#852
Conversation
Updated changelog to reflect recent changes and fixes.
formatted
these are vague description, maybe open a issue describing what is fixed and how to reproduce |
pr description edited |
so the issue is you should show me your config and |
|
ok, the right way to find backlinks is just 1. run in cmdline first approach automatically finds the picker you are using and open the results in picker so just do vim.keymap.set("n", "ob", function()
vim.cmd "Obsidian backlinks"
end, { desc = "Backlinks" })or more simple vim.keymap.set("n", "ob", "<cmd>Obsidian backlinks<cr>", { desc = "Backlinks", expr = true })your example call |

Backlinks command quickfix widows resolved.
Now, on use of the command, you are not stuck with the native nvim quickfix ui also displaying along with the users set picker. Also replaced empty ui, with notification of "No backlink" instead.
Before when using snacks.picker, the native horizontal quickfix select menu would display along with whatever picker you decide to use. This means after you make a selection the native window would also have to be exited. The pickers also would display if no backlinks were present. I've been nesting snack.picker logic nested in my keybinds however, im not sure if this is the intended use? example
vim.keymap.set("n", "<leader>ob" function() Snacks.picker.<whateverpicker>opts = {}