Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake syntax highligh and helper in Android Studio

CLion has very good support of CMake. It highlights syntax and provides suggestions. Android studio lacks this feature. Is there a way to enable/add it?

like image 411
kyb Avatar asked Feb 05 '23 09:02

kyb


2 Answers

Found the same problem a few month ago. As Cinder Biscuits mentioned, there was no such plugin found, except not working prototype CMaker. So, I just make my own plugin: CMake plugin for IntelliJ Idea CE and Android Studio

Work is still in progress. The plugin is inspired and based on CMaker by Aliaksandr Dubrouski.

CMake Syntax from cmake.org is mostly implemented. Commands, Variables, Properties, and Operators was taken from vim CMake support pluging.

There are few known syntax highlights bugs, mostly around $ symbol, because it's used to recognize Variable references in arguments. But those bugs could be reproduced mostly on synthetic tests while real CMakeLists.txt files shown correctly.

In case you don't need such a detailed highlight (i.e. it looks too motley) you can always change colors at plugin settings.

CMake plugin for IntelliJ Idea CE and Android Studio

like image 171
Artsiom Chapialiou Avatar answered Apr 29 '23 17:04

Artsiom Chapialiou


There is not for Android Studio. Your best alternative if you like Clion's UI would be to use Intellij IDEA with the Android and CMake plugins for one a single IDE experience.

https://www.jetbrains.com/help/idea/2016.3/prerequisites-for-android-development.html

like image 20
Cinder Biscuits Avatar answered Apr 29 '23 18:04

Cinder Biscuits