Language Features

Qingkuai does not rely on complex syntax extensions in the compiler. Instead, it provides rich language features through an LSP-based language service. These features include type inference, intelligent completion, diagnostics, code navigation, and semantic highlighting, covering framework capabilities such as component attributes, slots, scoped styles, directives, and reference attributes. With LSP, Qingkuai keeps syntax simple while significantly improving development experience and type safety.


IDE Extensions

Currently, the extension is available for VS Code. You can search for Qingkuai in the marketplace to install it.

VS Code extension
If you encounter IDE-related issues, please submit an issue in Qingkuai's language-features repository.

Emmet

Qingkuai language services provide good Emmet support. However, dynamic attributes conflict with Emmet's attribute-removal syntax, so component files use - to remove attributes. The following example creates an input tag without the type attribute:

txt
input[-type]

The original syntax:

txt
input[!type]

would create a dynamic attribute:

qk
<input !type={}>

Formatting

Document formatting is built into Qingkuai language services and implemented by prettier-plugin-qingkuai. If a component file contains syntax errors, formatting may fail. In that case, check the IDE output panel:

formatting error

Restart Language Service

When you encounter language service issues, open the VS Code command palette (Ctrl+Shift+P or Cmd+Shift+P), then run Qingkuai: Restart Language Server to restart the service:

restart language service

Code Navigation

Code navigation is a frequently used feature during development. This feature has some additional usages in component files:


Edit this page on github (This page has been translated from the Chinese version of the site. There may be inaccuracies in the translation. We welcome your help to improve the accuracy of this document.)