-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updatereadme * update readmes * review fixes
- Loading branch information
1 parent
f51e388
commit d6c654b
Showing
8 changed files
with
59 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Contributing to Cypher Language Support | ||
|
||
We're grateful for any thoughts or code you share. Feel free to open an issue if you run into a bug or have other improvement suggestions. To contribute a fix or a new feature we have a bit of process you'll need to follow: | ||
|
||
- Do your work in a personal fork of the original repository | ||
- Create a branch (with a useful name) for your contribution | ||
- Include unit/e2e tests if appropriate (obviously not necessary for documentation changes) | ||
- Take a moment to read and sign our [Contributor License Agreement](https://neo4j.com/developer/cla). | ||
|
||
We can't guarantee that we'll accept pull requests and may ask you to make some changes before they go in. | ||
Occasionally, we might also have logistical, commercial, or legal reasons why we can't accept your work but we'll try to find an alternative way for you to contribute in that case. | ||
|
||
## Building the project | ||
|
||
Pre-requisites: | ||
|
||
- Node.js LTS (18.x) | ||
- [antlr4-tools](https://github.com/antlr/antlr4-tools) easiest to install with `pip install antlr4-tools` (python3 required) | ||
|
||
In the root folder of the project run: | ||
|
||
- `npm install` | ||
- `npm run build` | ||
|
||
From here you can start the `react-codemirror-playground` with: | ||
|
||
`npm run dev:codemirror` | ||
|
||
To run the VSCode extension, see the `vscode-extension` [README.md](./packages/vscode-extension/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,32 @@ | ||
# cypher-lsp | ||
# Neo4j Cypher Language Support | ||
|
||
The mono repo for Neo4j's Cypher Language support, it contains: | ||
This mono repo contains packages that together make up Neo4j's Cypher Language support. | ||
|
||
- LSP server. | ||
- VSCode extension playground for testing. | ||
- Web Editor (codemirror) playground | ||
## Project status | ||
|
||
The Trello board for the project is [here](https://trello.com/b/0MAa3MMW/cypher-language-support). | ||
The project is in an early stage. We are still missing important features and the project is not yet stable. We welcome feedback and contributions! | ||
|
||
![](./imgs/auto-completion.gif) | ||
Try it out in our demo or in our alpha releases in [Neo4j Workspace](https://workspace.neo4j.io) and soon also in our VSCode extension. | ||
|
||
## Features | ||
## Project Overview | ||
|
||
- Syntax colouring. | ||
- Auto completion. | ||
- Errors highlighting. | ||
![](./imgs/repo-overview.png) | ||
|
||
## Getting started | ||
The project comprises several packages: | ||
|
||
Install [antlr4-tools](https://github.com/antlr/antlr4-tools). This will install the `antlr4` and auxiliary tools to work with the parser (like `antlr4-parse`). | ||
- [language-support](./packages/language-support/README.md) - The core library implementing the language support features. | ||
- [language-server](./packages/language-server/README.md) - The language server wrapper for the `language-support` package. | ||
- [vscode-extension](./packages/vscode-extension/README.md) - The Neo4j VSCode extension which bundles the `language-server` | ||
- [react-codemirror](./packages/react-codemirror/README.md) - A set of [codemirror6](https://codemirror.net/) cypher language support plugins and a react wrapper. | ||
- [react-codemirror-playground](./packages/react-codemirror-playground/README.md) - A playground for the codemirror integration. | ||
- [schema-poller](./packages/schema-poller/README.md) - An internal package we use to manage the Neo4j connection and keep the schema (procedure names, labels, database names, etc.) up to date in the language server. | ||
|
||
Run `npm install` in the root folder. This installs all dependencies in each package and generates the parser in the server package. The next steps depend on which project you want to run. | ||
## Capabilities | ||
|
||
After that, execute `npm run build`, which should compile the full project. | ||
- Syntax highlighting | ||
- Autocompletion | ||
- Linting | ||
|
||
### Running the codemirror demo | ||
## Building the project and contributing | ||
|
||
Please refer to the [codemirror-playground/README.md](./packages/codemirror-playground/README.md) for a detailed explanation. | ||
|
||
### Running the VScode playground | ||
|
||
Please refer to the [vscode-playground/README.md](./packages/vscode-playground/README.md) for a detailed explanation. | ||
|
||
### Running only the parser | ||
|
||
The parser is generated on install, but if you change the .g4 grammar files you can re-generate it using the following command in the server package: | ||
|
||
``` | ||
npm run gen-parser | ||
``` | ||
|
||
Once antlr4-tools is installed, then you can run the parser in standalone mode with: | ||
|
||
``` | ||
antlr4-parse server/src/antlr/Cypher.g4 oC_Cypher -gui | ||
[Write query][Enter] | ||
[Ctrl-D] | ||
``` | ||
See [CONTRIBUTING.md](./CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# language-support | ||
# Language Support | ||
|
||
Stand-alone language support for Cypher used in `server` and `codemirror`. | ||
This package contains the core language support features for Cypher built with ANTLR4. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Codemirror Playground | ||
# React Codemirror Playground | ||
|
||
Run `npm install` && `npm run dev-codemirror` in the root folder of the project or use launch the demo from the "Run & Debug" tab. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Neo4j schema poller | ||
# Neo4j Schema Poller | ||
|
||
The neo4j-sdk is a layer of abstraction on top of the neo4j-driver to enable re-use of common code across projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters