-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
open relative links to root #17
Comments
Hi Dan--I know it's been a while since you proposed this but I think this would improve the plugin, and I hope to implement it very soon. |
@olesendan I've pushed an implementation of this to the dev branch, if you want to give it a try. The dev readme is updated (see https://github.com/jakewvincent/mkdnflow.nvim/tree/dev), so you can see the sample config there. The |
(Just pushed this to main. Please let me know if you experience any issues with the new functionality!) |
Hi JAke. Sorry for my late reply. I will do some testing in the next cuple of days. If I encounter any problems, I will raise a new issue. Greetings from denmark |
Sounds good, thanks Dan! :) By the way, after implementing this, I realized that your suggestion was to be able to specify multiple files that together could identify the root directory. That wouldn't be too crazy to implement, but currently only one file can be provided as the "tell", just FYI. |
Hi Jake.
I've been thinking if it makes sence to enhance the function 'open-relative_to'. In my workflow, I create links to documents in my 'wiki' in two ways. Either a sub link from my document, or a link from another domain(which is in other sub filer/directories from the wiki root folder. These two a used random in my wiki pages.
I suggest that instead of setting the option in config 'open_relative_to', then use some logic to define if the link is relative to the document or relative to root of the wiki.
From my thinking there should be a function which defines root, based on content i a paraent folder( should search up in the directory tree untill it finds a folder with the defined content.) the content could be defined in config ex. 'root_dir_content = {'.git', '.root', '.wiki_root'}
then the open file function could choose who to open relative files from this logic.
From my thinking this should not interfer with how we implemented files from outside the wiki, because we prefix with 'file:'
What do you think?
Greetings from denmark.
Dan Olesen
The text was updated successfully, but these errors were encountered: