Skip to content
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

File names are not used in completions even though they are recognized in links (with wiki.style = "file-stem") #255

Open
Gelio opened this issue Oct 17, 2023 · 1 comment
Labels
bad UX enhancement New feature or request good first issue Good for newcomers

Comments

@Gelio
Copy link

Gelio commented Oct 17, 2023

Hey! First, thanks for this great LSP! It is the cornerstone of my Neovim/Obsidian workflow.

Status quo

For Marksman to play nicely with Obsidian, my .marksman.toml is:

[completion]
wiki.style = "file-stem"

Links are correctly referenced by their names. For example:

I am using [[XState]] for this project.

correctly points to XState.md and I can go do that file using "Go to reference".

image

Current behavior

When I then ask for completions for [[XS, I get nothing.

image

This is because XState.md does not have an h1 heading. In Obsidian, file names are used as document titles, so beginning a document with the same heading as the file name is redundant.

When I add the # XState heading at the top of XState.md, I do get XState.md as a suggestion:

image

Expected behavior

I would love it if marksman also included file names as completions. In this case, I would want XState.md to appear as a completion even if there is no # XState at the top of that file.

This would make the link resolution/autocomplete behave the same way. At the moment, the autocomplete does not show completions, but if I type the file name manually, the link is resolved correctly by marksman.

Related issues

Possibly related to #122

@artempyanykh
Copy link
Owner

Thanks for reporting @Gelio! I think this is perfectly reasonable and will improve the UX.

@artempyanykh artempyanykh added enhancement New feature or request good first issue Good for newcomers bad UX labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad UX enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants