Go to file
全卓 96f7b40fab hover 文档重构 2025-01-23 15:45:00 +08:00
.vscode update CMakeSimple, add more tests 2024-12-16 13:28:53 +08:00
build hover 文档重构 2025-01-23 15:45:00 +08:00
client hover 文档重构 2025-01-23 15:45:00 +08:00
images 更新 CHANGELOG 和 README 2024-11-27 16:26:35 +08:00
server hover 文档重构 2025-01-23 15:45:00 +08:00
syntaxes 当光标位于 ${} 中时,执行变量补全 2024-12-24 10:52:03 +08:00
.eslintrc.json Add unit test for symbol document 2024-12-13 10:17:26 +08:00
.gitignore hover 文档重构 2025-01-23 15:45:00 +08:00
.mocharc.json Add unit test for symbol document 2024-12-13 10:17:26 +08:00
.vscodeignore update .vscodeignore 2022-10-12 12:53:56 +08:00
CHANGELOG.md 更新版本号至 0.3.3,并在 CHANGELOG.md 中记录相关更改 2025-01-09 16:28:49 +08:00
LICENSE 添加第三方许可证说明文件 2024-10-23 11:00:31 +08:00
README.md 更新 README.md,添加开发环境设置说明 2025-01-07 13:19:11 +08:00
ThirdPartyNotices.txt 重命名文件 2024-10-29 11:20:13 +08:00
language-configuration.json 更新语言配置,添加尖括号的块注释和自动闭合对 2024-12-18 11:56:15 +08:00
package-lock.json hover 文档重构 2025-01-23 15:45:00 +08:00
package.json hover 文档重构 2025-01-23 15:45:00 +08:00
package.nls.json Add a setting to set path to pkg-config command 2024-12-12 13:19:36 +08:00
package.nls.zh-cn.json Add a setting to set path to pkg-config command 2024-12-12 13:19:36 +08:00
snippets.json 在代码片段中添加 CMAKE_CXX_EXTENSIONS 设置为 OFF 2024-12-24 10:58:07 +08:00
tsconfig.base.json refactor language server using typescript 2022-10-10 11:04:15 +08:00
tsconfig.json refactor language server using typescript 2022-10-10 11:04:15 +08:00
webpack.config.js 简化 webpack 配置 2024-06-20 15:15:39 +08:00

README.md

Description

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.

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 or github. Your feedback is highly appreciated.

Requirements

This extension is written in TypeScript, no other runtime dependencies are required. You should have CMake installed.

Features

  • syntax highlight
  • semantic tokens
  • commands, variable, properties... auto complete
  • document format
  • document link
  • go to defination
  • publish diagnostics
  • code action

demo

Development

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.

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
  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:

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:

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:

  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

Todo

  • Add more LSP features
  • Performance optimization
  • Unit/Integeation tests