lucas-clemente / language-cmake Goto Github PK
View Code? Open in Web Editor NEWAtom CMake language
Atom CMake language
AND
/OR
in conditional expressions should highlight as basic operands.
Instead of #
it uses /*
It is written with a starting #[[
and a closing ]]
.
Example from the docs:
#[[THIS IS A BRACKET COMMENT.
IT RUNS UNTIL THE CLOSE BRACKET.]]
message("First Argument\n" #[[BRACKET COMMENT]] "Second Argument")
(the words in uppercase are the "multiline comments". Case change is added in for effect and does not appear in the original documentation)
Here is a link to the docs: bracket-comment
CMake uses .in
files as templates in the function configure_file
. It would be great if these files would also be highlighted. Due to the nature of being a template this package can only highlight very few parts, e.g. @VAR_NAME@
.
In a similar package which provides syntax highlighting to EmPy templates (https://atom.io/packages/language-empy) I use a second file extension to describe the language of the expanded file, e.g. filename.xml.em
. language-empy
highlights only the template logic and then refers to an existing language to highlight the rest, in this case xml. While it is kind of annoying having to list the various second level extensions that was the only way I could come up with.
Would this feature be reasonable for this package or would you like to keep it in a separate package like language-cmake-in
? I am happy to contribute if you think it makes sense to be added to language-cmake
.
Currently modules are not supported by Highlight tools.
The most commonly used module: ExternalData, feature_summary, ExternalProject and FetchContent are not supported:
https://cmake.org/cmake/help/v3.12/module/ExternalProject.html
https://cmake.org/cmake/help/git-stage/module/FetchContent.html
https://cmake.org/cmake/help/git-stage/module/FeatureSummary.html
https://cmake.org/cmake/help/v3.12/module/ExternalData.html
Some real life examples of usage could be found at:
https://mirkokiefer.com/cmake-by-example-f95eb47d45b1
Full list of all available modules are available at:
https://cmake.org/cmake/help/v3.14/manual/cmake-modules.7.html
It will be great to add highlight support for these commands. Thanks
Hello!
I believe it would be a great addition to support CMake's (relatively new) block level comment syntax.
Comments start with #[[ and end with ]]
https://cmake.org/cmake/help/v3.1/manual/cmake-language.7.html#comments
The following keywords (https://cmake.org/cmake/help/v3.5/command/if.html) are currently not highlighted atm. These are just examples, there might be others missing:
MATCHES
STR*
VERSION_*
IN_LIST
The comment in the code (
) suggests that the list can be updated somehow automatically. From the text alone I couldn't figure out how this should be done. Is there any more information about that process? Then I would be happy to provide a PR for this.Howdy,
I noticed that the variable PATH
wasn't getting caught by your grammars, so I updated the file and created a PR - #12
Cheers,
Chris
Trying to set the tab length to 2 does not work. Doing so, either in the settings interface, or in the config.cson, results in the value being automatically change to 4. Setting any other value than 2 seem to work just fine.
I am using language-cmake v0.2.0 on Atom v.1.8.0.
Actually, seeing how GitHub does not colourize them either, I think this issue is more a question. Why are these keywords not colourized (both in your theme and by GitHub)?
TRUE
FALSE
ON
OFF
Calls to set(...)
, string(...)
and source_group(...)
only have the s
at the start highlighted correctly, the other characters (et
, tring
, ource_group
) are not highlighted.
This may affect other CMake functions (likely all beginning with s), but I've not had a chance to test them.
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (/Applications/Atom.app/Contents/Resources/app/src/package.js:550:9)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/package.js:172:43)
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\Ugo Pattacini\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:565:9)
<unknown> (C:\Users\Ugo Pattacini\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:187:43)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.