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

Mention F1's Inspect Tokens in Monarch docs #1805

Closed
JoshuaKGoldberg opened this issue Feb 3, 2020 · 3 comments · Fixed by #1807
Closed

Mention F1's Inspect Tokens in Monarch docs #1805

JoshuaKGoldberg opened this issue Feb 3, 2020 · 3 comments · Fixed by #1807

Comments

@JoshuaKGoldberg
Copy link
Contributor

I'm trying to target different syntax trivia in custom themes and finding it difficult to tell which trivia classes map to what. This HTML in development corresponds to some C++ code:

<span>
  <span class="mtk12">int</span>
  <span class="mtk1">&nbsp;main</span>
  <span class="mtk17">()</span>
  <span class="mtk1">&nbsp;</span>
  <span class="mtk17">{</span>
</span>

It'd be useful when developing to, maybe:

  • Medium? size: surface what token types the classes such as mtk12 map to
  • Large? size: provide some kind of astexplorer.net-style visualizer for tokens parsed from text

Is there some way this experience could be made better? 🙏

@alexdima
Copy link
Member

alexdima commented Feb 3, 2020

Have you tried F1 > Developer: Inspect Tokens?

image

@alexdima alexdima added the info-needed Issue requires more information from poster label Feb 3, 2020
@JoshuaKGoldberg
Copy link
Contributor Author

😭 @alexdima this is amazing, thank you! I pored over the monarch.html docs and had no idea this existed.

Updating the title of this issue to reflect a real request: can this be mentioned in the docs? 🙏

@JoshuaKGoldberg JoshuaKGoldberg changed the title Surface Monarch token types in development mode Mention F1's Inspect Tokens in Monarch docs Feb 3, 2020
@alexdima
Copy link
Member

alexdima commented Feb 4, 2020

@JoshuaKGoldberg 👍 Sorry about that!

Would you please like to create a PR to document it?

@alexdima alexdima added documentation and removed info-needed Issue requires more information from poster labels Feb 4, 2020
@alexdima alexdima added this to the January 2020 milestone Feb 4, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants