Language Support
This package contains the core language support features for Cypher built with ANTLR4.
Usage
The API is not yet properly documented, but here are two simple examples of what you can do!
npm install @neo4j-cypher/language-support@next
import {
autocomplete,
validateSyntax,
DbSchema,
} from '@neo4j-cypher/language-support';
const schema: DbSchema = { labels: ['Person'] };
autocomplete('MATCH (n:', schema);
validateSyntax('RETRN 123', schema);
Cypherfmt CLI
This package includes a command-line tool for formatting Cypher queries using cypherfmt
. After installation, you can use it via the cypherfmt
command:
cypherfmt file.cy
cypherfmt -i file.cy
cypherfmt -c file.cy
cypherfmt directory/
cat file.cy | cypherfmt
For more information, run cypherfmt --help
.