orgmode
orgmode copied to clipboard
feat(links)!: Use refactor links structure
Start using new links structure introduced in https://github.com/nvim-orgmode/orgmode/pull/802.
@chipsenkbeil can you check if using this branch breaks anything in org-roam.nvim? It shouldn't, but it's best to double check. You will need to introduce one change here: https://github.com/chipsenkbeil/org-roam.nvim/blob/192732a8de167e7770b12db31e737239311b1a43/lua/org-roam/setup/plugin.lua?plain=1#L20
I added a hyperlink class in https://github.com/nvim-orgmode/orgmode/blob/71c57cab31b78d2c6907d2961b6c2666ea9383a1/lua/orgmode/org/links/hyperlink.lua?plain=1#L8, and it works basically the same for your usage. Underlining url prop is also a different class, but it has the get_id method that you are using.
For this line you can use Hyperlink.at_cursor function instead of these 3 lines to get current link.
Besides this I think everything should be working as expected, but please give it a thorough test.
@seflue @SlayerOfTheBad could you switch to this branch and see if everything related to hyperlinks works as expected?
Thanks!