github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.32k stars 4.26k forks source link

CMake syntax needs replacing #6659

Open petk opened 10 months ago

petk commented 10 months ago

Describe the bug

Basically any modern CMake code on GitHub is not rendered properly anymore. I understand that there is upstream repository that holds the syntax, but can this be sorted somehow differently? That repository hasn't been updated in nearly 8 years and I doubt it will get any update in any near future.

https://github.com/textmate/cmake.tmbundle

lildude commented 10 months ago

You're welcome to submit a PR to change the grammar 😉

lildude commented 10 months ago

These also an issue with the highlighting engine which came to light last week… changing grammars won't solve that problem and it's also likely to be what's causing problems now if this only recently became an issue.

petk commented 10 months ago

Yeah, I could open a PR on the mentioned repository. But if someone is already familiar with all these software used here that would be really nice and much more faster resolved. The reason I'm opening this discussion is based on the inactivity of the upstream repo also. That's why. Because we know how opening some PR on a dead repository goes.

lildude commented 10 months ago

I was referring to opening a PR on this repo to change the grammar we use to one that is actively maintained and doesn't exhibit the problems you are seeing. Linguist is a community-supported project and relies almost entirely on user contributions as it's impossible to know every language supported well enough to know what is expected and what isn't.

lildude commented 10 months ago

I've opened https://github.com/github-linguist/linguist/issues/6668 to track the highlighting issues in one place

nilason commented 6 months ago

I have just submitted a PR https://github.com/textmate/cmake.tmbundle/pull/7 to add support for CMake bracket comments. Considering the low activity upstream (and the likelihood for it to be merged anytime soon), you are free to use https://github.com/nilason/cmake.tmbundle/tree/fix_multiline_comment.

I use this with TextMate, so I'm curious to know what else is missing.