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

FR: Update CMake lexer to support more keywords #205

Open
iahung2 opened this issue Mar 23, 2024 · 6 comments
Open

FR: Update CMake lexer to support more keywords #205

iahung2 opened this issue Mar 23, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@iahung2
Copy link

iahung2 commented Mar 23, 2024

For example, keywords like COMMENT and VERBATIM are currently not highlighted:

https://github.com/AdeptLanguage/Adept/blob/master/CMakeLists.txt

@SpartanJ SpartanJ self-assigned this Mar 23, 2024
@SpartanJ SpartanJ added the enhancement New feature or request label Mar 23, 2024
@SpartanJ
Copy link
Owner

Maybe you can give me a hand with this one? You already know how to do it =)

@iahung2
Copy link
Author

iahung2 commented Mar 25, 2024

Maybe you can give me a hand with this one? You already know how to do it =)

Where can I get a full list of CMake keywords? I can only add the keywords I found that are not properly highlighted when I read people's CMakeLists.txt.

Update: I can't help. Your addCMake() is a mess. How do you tell if a keyword is of type literal, keyword1, or keyword2? I really don't know!

@iahung2 iahung2 closed this as completed Mar 25, 2024
@SpartanJ
Copy link
Owner

 Update: I can't help. Your addCMake() is a mess. How do you tell if a keyword is of type literal, keyword1, or keyword2? I really don't know!

😆 keywords use "keyword2", literals use "literal" and operators use "operator" haha sorry but that's all the logic behind. But yeah, don't worry, we can get the list from other editors, as always. As far as I saw in this comment, CMake has a ridiculous number of keywords, we can add them with some patience.

@iahung2
Copy link
Author

iahung2 commented Mar 25, 2024

Update: I can't help. Your addCMake() is a mess. How do you tell if a keyword is of type literal, keyword1, or keyword2? I really don't know!

😆 keywords use "keyword2", literals use "literal" and operators use "operator" haha sorry but that's all the logic behind. But yeah, don't worry, we can get the list from other editors, as always. As far as I saw in this comment, CMake has a ridiculous number of keywords, we can add them with some patience.

By what logic do you have APPEND as literal? I really don't understand!

There are a lot of cases like that. For example, COMMAND is also literal. Yes, I know you do that to make it correctly highlight CMake. But I don't get the logic behind it. This is the reason why I don't think I can help.

@SpartanJ
Copy link
Owner

If you want to collaborate you are free to change all that logic, I really don't care if it looks good, so feel free to change it! I really don't remember where I took the list. Scintillua looks pretty complete. I might do it myself.

@iahung2
Copy link
Author

iahung2 commented Mar 25, 2024

I might do it myself.

Please help me this time. Thank you.

@iahung2 iahung2 reopened this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants