2022-10-12 12:42:44 +08:00
# Description
2022-08-19 16:13:03 +08:00
2024-12-16 13:28:53 +08:00
CMake IntelliSense is a Visual Studio Code extension that support CMake language. It provides features such as syntax highlighting, semantic tokens, document format, and code completion for CMake scripts.
2024-11-23 17:38:46 +08:00
## Feedback
This extension is still under development, you may encounter bugs or missing features. If you have any suggestions or find any bugs, please feel free to open an issue on [gitee ](https://gitee.com/openKylin/cmake-intellisence/issues ) or [github ](https://github.com/quanzhuo/cmake-intellisence/issues ). Your feedback is highly appreciated.
## Requirements
2024-12-04 09:39:38 +08:00
This extension is written in TypeScript, no other runtime dependencies are required. You should have [CMake ](https://cmake.org/download/ ) installed.
2022-08-19 16:13:03 +08:00
## Features
2022-12-06 10:57:16 +08:00
+ syntax highlight
+ semantic tokens
2022-10-12 12:42:44 +08:00
+ commands, variable, properties... auto complete
2022-12-06 10:57:16 +08:00
+ document format
2024-11-27 16:26:35 +08:00
+ document link
2022-12-06 10:57:16 +08:00
+ go to defination
+ publish diagnostics
+ code action
2022-08-19 16:13:03 +08:00
2024-11-23 17:38:46 +08:00

2023-10-12 11:03:42 +08:00
2024-12-04 13:00:48 +08:00
## Development
2025-01-07 13:19:11 +08:00
**Note**: This section describes the development environment setup required for modifying/developing this extension. If you just want to use this extension, simply install it without any additional setup.
2024-12-11 16:26:48 +08:00
This project use antlr4 to generate the parser and lexer for CMake language. You need to setup antlr4 command line tool before you start development.
1. Install Java JDK/JRE, make sure java command is available in your terminal
2. Download [antlr-4.13.2-complete.jar ](https://www.antlr.org/download/antlr-4.13.2-complete.jar )
3. Add a script named `antlr4` in your path, and set the script content as follows:
on Linux/macOS, you can name the script `antlr4` and add execute permission to it, then put it in your path. The content of the script is as follows:
```bash
java -jar /path/to/antlr-4.13.2-complete.jar "$@"
```
on Windows, you can name the script `antlr4.bat` and put it in your path. The content of the script is as follows:
```bat
java -jar C:\path\to\antlr-4.13.2-complete.jar %*
```
After setting up antlr4 command line tool, you can flow the steps below to start development:
2024-12-04 13:00:48 +08:00
1. Clone the repository and open it in Visual Studio Code
2. Run `npm install` to install dependencies
3. Run `npm run develop` to compile the source code
4. Select `Client + Server` in the debug panel and press `F5` to start the extension
2024-12-04 09:39:38 +08:00
## Todo
2023-10-12 11:03:42 +08:00
2024-12-04 09:39:38 +08:00
+ Add more LSP features
+ Performance optimization
+ Unit/Integeation tests