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

Feature Request: Bracket comment highlighting for CMake #4710

Closed
mathomp4 opened this issue Nov 8, 2019 · 2 comments
Closed

Feature Request: Bracket comment highlighting for CMake #4710

mathomp4 opened this issue Nov 8, 2019 · 2 comments

Comments

@mathomp4
Copy link

mathomp4 commented Nov 8, 2019

I would like to request the ability to syntax highlight CMake bracket comments as "comment". That is, currently if I do this:

# This is a comment
This is not a comment

linguist sees the #-comment as a comment.

#[[ This is a bracket comment in CMake.
It lasts until the end of the bracket ]]
This is not a comment

is not seen as a comment. It would be nice if linguist (and thus GitHub) could display that as a "block comment" much like how it does with C-code:

/* This is a nice multiple
 * line comment */
This isn't

NOTE: I know that the docs say that bracket comments are only supported since CMake 3.0 but that was 5+ years ago. I guess one could try to be smart and detect if cmake_minimum_required is set to something higher than 3.0, but I think it's a fair assumption to think 3.x is now standard enough.

@lildude
Copy link
Member

lildude commented Nov 8, 2019

This has nothing to do with Linguist. This is entirely driven by the grammar as this is a syntax highlighting behaviour. As pointed out in the Troubleshooting docs linked in the template you deleted, you will need to raise this with the maintainers of the grammar Linguist uses.

If the grammar is no longer maintained, please feel free to open a PR linking to a maintained grammar that behaves as you wish.

As this is not something Linguist has any control over, I'm closing this issue.

@lildude lildude closed this as completed Nov 8, 2019
@nilason
Copy link

nilason commented May 13, 2024

See #6496 (comment)

@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants