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

Show Comments in TextMate Scope Inspector #206192

Open
1 task
Number-3434 opened this issue Feb 25, 2024 · 7 comments
Open
1 task

Show Comments in TextMate Scope Inspector #206192

Number-3434 opened this issue Feb 25, 2024 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@Number-3434
Copy link

Number-3434 commented Feb 25, 2024

In TextMate grammar, you can declare comments like so:

[
  {
    "match": "^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?",
    "name": "meta.tag.sgml.doctype.html",
    "comment": "Doctype declaration."
  },
]

It would be useful if VSCode showed the comments in some way, as currently they are only descriptive in the TextMate file, and do not provide any external help.

This could be used to provide basic documentation for TextMate scopes.

You can also declare names for token customisations.

Proposal

Show comments in the TextMate scope inspector (access using Developer: Inspect Editor Tokens and Scopes (editor.action.inspectTMScopes))

image

Views

Tasks

  1. alexdima
@Number-3434

This comment was marked as off-topic.

@Number-3434 Number-3434 changed the title Show Comments TextMate Scope Inspector Show Comments in TextMate Scope Inspector Feb 25, 2024
@alexr00
Copy link
Member

alexr00 commented Feb 26, 2024

Took a quick look at adding this. It will need a change in vscode-textmate. It should be very easy to show the comments in VS Code if microsoft/vscode-textmate#227 is added.

@alexr00 alexr00 added the feature-request Request for new features or functionality label Feb 26, 2024
@alexr00 alexr00 added this to the Backlog milestone Feb 26, 2024
@Number-3434
Copy link
Author

Wow, thank you 😊!

@alexr00
Copy link
Member

alexr00 commented Feb 26, 2024

@Number-3434 just to be clear, I don't know if or when microsoft/vscode-textmate#227 will be added! But if it is, then the additional work will be small.

@Number-3434
Copy link
Author

Number-3434 commented Feb 26, 2024

@alexr00 I understand, I'm just very happy that it is now in the Backlog (instead of Backlog Candidates, which I've never been able to get more than 3 upvotes on) 😃.

@Number-3434
Copy link
Author

Number-3434 commented Feb 26, 2024

@alexr00 By the way, would it be possible to also include the name property in the TextMate customisations in editor.tokenColorCustomizations?

@WilmarE
Copy link

WilmarE commented Feb 26, 2024

By the way, would it be possible to also include the name in the textmate customisations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants