zk-org/zk-nvim

feat: backlink should jump to correspondent line in file

UnkwUsr opened this issue · 2 comments

I see there 2 solutions:

  1. Implement it on zk server side and then do apropriate steps on vim plugin side.
  2. Implement it only on vim plugin side.

For second option I did some dirty patch: UnkwUsr@e10629f

I'm not sure this can be easily added to the zk server, as ZkBacklinks uses zk.list down the hood, which has no notion of a target column:line.

Alternatively, you can use LSP references for backlinks, which work with column:line. But of course the UI is not as nice.

map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)

@mickael-menu Can you reopen it please? I'm staying with my custom solution and it works flawlessly for me (idk, maybe I'm not using some features that this can break, as I see that my modified function is part of api).

I think this feature can be very useful for other users if they see this issue and give it a try, and so then things also may go forward.

Or, maybe I should open draft pull req with temporary solution?