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

Tag Explorer to support tags in HTML comments #1202

Open
redactedscribe opened this issue Apr 22, 2023 · 0 comments
Open

Tag Explorer to support tags in HTML comments #1202

redactedscribe opened this issue Apr 22, 2023 · 0 comments

Comments

@redactedscribe
Copy link

Is your feature request related to a problem? Please describe.

Take <!-- #TODO --> for example, it does not show in the Tag Explorer panel. Only the syntax highlighting for the tag is supported in this scenario (which may or may not be correct, depending on what the intended Foam behaviour is).

Describe the solution you'd like

I think it would be good if it could be optional to include tags within HTML comments in the Tag Explorer because I like to classify tags outside of HTML comments as public (rendered) ones, and tags inside comments as ones not necessary to be read by anyone viewing the document (tagged comments simply for the author's convenience). Optional so that it could be turned off to only browse tags which are rendered. I don't believe I've picked this habit up from anywhere else, so I'm not sure how useful others would find this. Maybe these type of tags should have some kind of name? Markup tags?

Describe alternatives you've considered

There's also a related issue regarding the overall detection of tags: The syntax highlighting works fine for -#TODO (which I'm guessing it shouldn't), but the tag doesn't shown in Tag Explorer, presumably because Foam expects whitespace before the hash symbol.

The only reason I bring this up is because is that it's possible to configure VS Code to use editor.comments.insertSpace: false so <!--#TODO--> will be the result when toggling the line into a comment post writing it (which I presume would need manual correction to include whitespace should this feature request be implemented). Maybe a specific edge case for the sequence <!--#<tag> could be considered as valid so that the user could configure the aforementioned VS Code setting as they please? I can't think of any other scenario where you'd have an intentional tag without preceding whitespace in a Markdown file.

For my use case, the alternative would be to not rely upon Foam to track these author-only type comments containing a #TODO tag, but instead on a dedicated to-do comments extension. The linked extension is flexible enough that I could continue to use the hashtag format rather than the traditional plain TODO if desired, but I still think there'd be some value from being able to track both these classifications of information using Foam only, e.g. Foam could see this: <!-- #needs-more-research: Obsidian vs Logseq? Foam increasingly looks like the most open choice. --> 🙂

Thanks for your consideration.

Foam 0.22.2
VSCodium 1.77.3

Screenshots or Videos

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant