Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readmes #118

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
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/).
57 changes: 20 additions & 37 deletions README.md
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](workspace-preview.neo4j.io) and soon also in our VSCode extension.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to workspace.neo4j.io

## 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 and error reporting

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe linting as you proposed instead?

### 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).
4 changes: 2 additions & 2 deletions packages/language-server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cypher-language-server
# Language Server

This package contains a LSP server wrapper for the `language-support` package.
A language server wrapper for the `@neo4j-cypher/language-support` package.

## Bundle the server and run with node

Expand Down
4 changes: 2 additions & 2 deletions packages/language-support/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# language-support
# Langauge Support

OskarDamkjaer marked this conversation as resolved.
Show resolved Hide resolved
Stand-alone language support for Cypher used in `server` and `codemirror`.
This package contains the core language support features for Cypher built with ANTLR4.
2 changes: 1 addition & 1 deletion packages/react-codemirror-playground/README.md
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.
2 changes: 1 addition & 1 deletion packages/react-codemirror/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# React Codemirror Experimental
# React Codemirror

This package can be built with `npm run build` and then published to npm with `npm publish`.

Expand Down
2 changes: 1 addition & 1 deletion packages/schema-poller/README.md
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.
4 changes: 3 additions & 1 deletion packages/vscode-extension/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# vscode-playground
# VSCode Extension

This is a VScode extension playground for testing the Cypher language server.

It's not yet published on the VSCode marketplace, so to test it you need to run it locally.

OskarDamkjaer marked this conversation as resolved.
Show resolved Hide resolved
For running it, compile the code first:

```
Expand Down
Loading