Closed vicecaycedo closed 11 months ago
By "wikilink" do you mean like this [[ ... ]]
?
I think this is possible. I can think of two options for how this would work:
[[
and then the search term, but when the completion is accepted it would insert the MD form of the link instead of the wiki form. You would get this behavior by setting some value in obsidian.nvim's config.[
and then the search term (instead of double brackets [[
). We would need to implement a separate completion source, but I think I like this option better because it allows users to get both forms of link style without any additional configuration changes.Yes, that's exactly what I meant 🙂
I like the second option more as well, but if that's too much work, the first option seems good to me too!
Thanks for making this plugin!
Need this feature too, 2 is better.
Ok I will try to find some time to implement option 2 soon. In the meantime, if anyone else wants to take a stab at this, here's what I'd suggest: Create a new lua file for the completion source: lua/cmp_obsidian_md.lua
. Start by just copying the code from lua/cmp_obsidian.lua
. Most of the functionality is implemented in lua/obsidian/completion.lua
, so you might have to add new variants of those functions.
Option 2 is now implemented in #237
🚀 The feature, motivation and pitch
Markdown links are generally better supported than WikiLinks in other tools. As such, Obsidian has the option to use markdown links instead of wikilinks. Can a similar configuration option be provided here for the autocompletion? Thanks!
Alternatives
No response
Additional context
No response