Closed TheBlob42 closed 10 months ago
Thanks for putting it together @TheBlob42! 💖 I'll have a close look shortly
The one thing missing currently are dedicated tests for the DocumentSymbold and WorkspaceSymbol functionalities. If you're cool with the changes and the layout I would take some time to add those 🙂
I have cleaned up my changes and the commit history. I have also added some missing tests (workspace symbols) and adapted the existing ones to incorporate the changes in relation to tags, so that they get tested as well.
@artempyanykh please have a look. I am happy to discuss any changes being made :slightly_smiling_face:
I'll push a new release shortly
Hi @TheBlob42 and @artempyanykh thanks for the change! Works great (feel free to close #261).
One minior comment: if I have an url like https://docs.google.com/spreadsheets/d/1Rr7GcfjUwhZfylUk0FGL0Et4kYF5etl49OpRwRmhhlg/edit#gid=1116260529&range=D12
marksman will treat this as tag. Is it possible to filter out these cases?
@petobens good catch :thinking: would probably be worth its own issue
Sure! Done. Thanks!
I'm super excited this was added! I've been using tags for some time and I missed the LSP features for them.
One enhancement I can suggest is supporting nested tags from Obsidian, like #home/chore
, #work/meeting
. This would make my Neovim authoring experience even better. I can create an issue for it if you'd like
@Gelio please do create a separate issue for this. Would be great if you could elaborate more on what kind of support you want from nested tags, example use cases.
Sure thing, I created https://github.com/artempyanykh/marksman/issues/267
This PR improves tag related functionality with the following:
Obviously these changes are somewhat opinionated but I am open for discussion. Having tags available as symbols makes it easier to find related content. Especially for people using a Zettelkasten or other note taking system with marksman. Quickly finding all notes related to a certain tag or quickly jumping to a relevant section in a long markdown document should ease these workflows.
In regards to the filtering I always wondered why I could not enter any more text after the initial
#
to filter for a specific tag. I found the related comment in the code, but I don't understand why this decision was made.Problem to separate headings and tags
Since all symbols in markdown are of the type "String" (nothing else really fits) they are hard to distinguish from another. For the workspace symbols I have made the prefix (e.g. "Tag", "H1", "H2" etc.) filterable as well so that one could easily filter only for tags or heading. However this only makes sense for people using some sort of fuzzy searching instead of a literal string matching where this could lead to usability issues. I am open for other ideas on how to solve this
Once this is clarified I would also check the formatting and add tests for these new cases :slightly_smiling_face: