Skip to content

cap-js-community/tree-sitter-cds

REUSE status

tree-sitter-cds

About this project

CAP CDS grammar for tree-sitter.

Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be:

You can use tree-sitter-cds to highlight CAP CDS files in Neovim and to query the concrete syntax tree of CDS files.

This project followed the instructions of the tree-sitter guide.

Screenshot of Neovim. A CDS file is opened and has proper syntax highlighting.

Documentation

Please refer to the docs/ folder. It contains:

Download and Installation

If you want to use tree-sitter-cds in Neovim for syntax highlighting, please see Neovim Support for an installation guide.

Documentation on Node.js and Rust language bindings is work-in-progress.

Requirements

If you want to use tree-sitter-cds in Neovim for syntax highlighting, please see Neovim Support for requirements.

For local development setup, see Development Docs.

How to obtain support

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues.

Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines as well as our development documentation.

Features & Roadmap

This project contains a tree-sitter grammar for CAP CDS.

The main goal of this project it to provide syntax highlighting, e.g. for Neovim.

It is not a 100% CAP CDS compatible parser. There are places that this grammar can't parse properly, yet. There is also no error reporting by tree-sitter and the syntax tree can change any time, as this project is not complete, yet.

In the future, we may try to add support for stack-graphs by GitHub.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2024 SAP SE or an SAP affiliate company and tree-sitter-cds contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.