You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have Markdown links to asset files which don't have an extension in my documents. For example:
Add [this file](assets/.editorconfig) to the root of the new project.
If I Ctrl+left click on this link markup in the editor, Foam generates a new .editorconfig.md file instead of just opening the existing .editorconfig file in an editor (as VS Code does when the Foam extension is not installed), and also changes the path in the link markup:
Add [this file](.editorconfig) to the root of the new project.
With files that have an extension, this behavior can at least be worked around by adding the file extension to the list in the extension's foam.files.attachmentExtensions setting. However, this is not possible for files that don't have an extension, which is common for "dotfile" configuration files.
Describe the solution you'd like
Don't create a new note file if the target of a Markdown link already exists. In this case, it is obvious the user intended the link to target that existing file so it is silly to instead create a note.
Even where it is possible to work around this via the foam.files.attachmentExtensions setting, it shouldn't be necessary to do that. Foam should be smart enough to understand that valid Markdown links should be left alone and used as-is.
Describe alternatives you've considered
An alternative would be to make the foam.files.attachmentExtensions setting more flexible (e.g., supporting globs).
I would also be satisfied if a new setting was added to disable this automatic document creation feature entirely as I don't find it to be of value for my particular use case.
Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have Markdown links to asset files which don't have an extension in my documents. For example:
If I Ctrl+left click on this link markup in the editor, Foam generates a new
.editorconfig.md
file instead of just opening the existing.editorconfig
file in an editor (as VS Code does when the Foam extension is not installed), and also changes the path in the link markup:With files that have an extension, this behavior can at least be worked around by adding the file extension to the list in the extension's
foam.files.attachmentExtensions
setting. However, this is not possible for files that don't have an extension, which is common for "dotfile" configuration files.Describe the solution you'd like
Don't create a new note file if the target of a Markdown link already exists. In this case, it is obvious the user intended the link to target that existing file so it is silly to instead create a note.
Even where it is possible to work around this via the
foam.files.attachmentExtensions
setting, it shouldn't be necessary to do that. Foam should be smart enough to understand that valid Markdown links should be left alone and used as-is.Describe alternatives you've considered
An alternative would be to make the
foam.files.attachmentExtensions
setting more flexible (e.g., supporting globs).I would also be satisfied if a new setting was added to disable this automatic document creation feature entirely as I don't find it to be of value for my particular use case.
Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: