Add option to generate Obsidian-compatible wiki links #728
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new option
use_name_only
for thewiki_link_func
setting that generates links in the[[Foo]]
format. This ensures compatibility with the Obsidian desktop app, which might not recognize links in the[[alias]]
format.Changes made:
use_name_only
option towiki_link_func
, which generates links using the filename and the relative path without the extension.use_name_only
option differs from the existinguse_alias_only
, asuse_alias_only
might not work correctly with the desktop version if the alias is not identical to the filename.Reason for the contribution:
The default autocompletion function generated links that were not recognized by the Obsidian desktop app, making note navigation more difficult. With this function, links are compatible and easy to use in both
obsidian.nvim
and the Obsidian app.