marksman icon indicating copy to clipboard operation
marksman copied to clipboard

Support dot/period-delimited links

Open connertennery opened this issue 1 year ago • 3 comments

I've moved to Neovim from VS Code where I previously used Dendron. Dendron has a concept of hierarchies and schemas which let you start off with a loose structure and enforce it more as you discover how you want to organize your notes.

Something I've found quite useful is the dot-delimited naming format for files and links instead of using directories. e.g. [[tool.xpra]] -> **/tool.xpra.md

When moving to Neovim I installed Marksman through Mason but I've noticed an issue with Marksman when trying to link to files.

directory

. root/
├─ nest/
│ └─ nested-file.md
├─ demo.md
├─ tool.dendron.md
├─ work.issue.alpha-20.md
├─ work.issue.alpha-[...].md # 21-27
└─ work.issue.alpha-28.md

When I begin typing, the autocompletion is great, but as soon as I press . the completion goes away which makes it hard to know what content is within a hierarchy.

image

typing with completion

image

immediately after pressing .

image

completion works after typing a letter that matches an existing file

I thought I could work around this by switching to directories, but the project-root isn't taken into account when finding files for autocompletion. The relative or absolute path must be given, which can be difficult to maintain if files shift around.

image

typing directory name

image

immediately after pressing /

image

completion works after typing a letter that matches an existing file - however it now suggests nest which wasn't available before and doesn't link to any existing file


I've tested this against all three options for configuring wiki links but they all have the same result.

Additionally, while it's likely out of scope, having the levels of the dot hierarchy available in autocompletion would be very helpful. e.g. If you have files AAA.BBB.CCC.md and AAA.DDD.EEE.md then typing [[AAA.]] would list AAA.BBB and AAA.DDD as autocompletion options.

Let me know if I've missed something obvious or if I can do anything to help.

Thank you!

connertennery avatar Jul 01 '23 02:07 connertennery