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.
Adds auto completion for links to the completion module.
closes #752
screen_cap.mp4
Here's a list of the completions:
{:|}
workspace relative file paths{#|}
all headings in the current file{*|}
level 1 headings in current file (TODO status is removed){**|}
level 2 headings in current file (and so on){^|}
footnotes in the current file{:path:#}
headings from the file at path{:path:*}
level n headings from the file at path{:path:^}
footnotes from the file at path. Will find^ footnote
and^^ long footnote
All of these should work with spaces after the item (ie.
{# |}
will still complete correctly).All of them should close the link correctly if it's not closed (ie. selecting a completion when the text looks like this:
{:|
will close the link with:}
).Currently the completion source shows as
text
. I'm not sure how to change that. It would be nice to change them to likeKeyword
orSymbol
or something so that it's more clear that these are valid headings/paths being suggested by neorg, not just text from the buffer.There might be more links that I'm missing, I want to make sure I've covered them all.
this might be really slow in large workspaces. It's not a problem for me though, but admittedly I don't have a ton of notes.