Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer committed Oct 19, 2023
1 parent 117fcab commit f849e82
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 24 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Cypher Language Support
# Neo4j Cypher Language Support

This mono repo contains packages that together make up Neo4j's Cypher Language support.

## Project status

The project is currently in an early stage. We are still missing important features and the project is not yet stable. We welcome feedback and contributions!
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!

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.

## Project Overview

![](./imgs/repo-overview.png)

The packages are:
The project comprises several packages:

- [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.
Expand All @@ -21,6 +21,12 @@ The packages are:
- [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.

## Capabilities

- Syntax highlighting
- Autocompletion
- Linting and error reporting

## Building the project and contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).
17 changes: 6 additions & 11 deletions packages/language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ A language server wrapper for the `@neo4j-cypher/language-support` package.
## Bundle the server and run with node

To package the language server into a single javascript bundle, go to the root of the project and
do `npm run assemble` or `npm run assemble -- -- --minify` if you'd rather have the code minified.
After that a file `./packages/server/dist/cypher-language-server.js` will be generated.
do `npm run build`.
After that a file `./packages/language-server/dist/server.js` will be generated.

You can run the language server with `node ./cypher-language-server.js --stdio`.
You can run the language server with `node ./server.js --stdio`.

Below you can find a few examples in Typescript on how to send messages to that server.

Expand All @@ -17,9 +17,7 @@ Below you can find a few examples in Typescript on how to send messages to that
```typescript
import * as child_process from 'child_process';

let lspProcess = child_process.fork('cypher-language-server.js', [
'--node-ipc',
]);
let lspProcess = child_process.fork('server.js', ['--node-ipc']);
let messageId = 1;

function send(method: string, params: object) {
Expand Down Expand Up @@ -95,7 +93,7 @@ const server = net.createServer((socket: net.Socket) => {
});

server.listen(3000, () => {
child_process.spawn('node', ['cypher-language-server.js', '--socket=3000']);
child_process.spawn('node', ['server.js', '--socket=3000']);
});
```

Expand All @@ -105,10 +103,7 @@ server.listen(3000, () => {
import * as child_process from 'child_process';
import * as rpc from 'vscode-jsonrpc/node';

let lspProcess = child_process.spawn('node', [
'cypher-language-server.js',
'--stdio',
]);
let lspProcess = child_process.spawn('node', ['server.js', '--stdio']);
let messageId = 1;

const reader = new rpc.StreamMessageReader(lspProcess.stdout);
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

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.
8 changes: 3 additions & 5 deletions 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.

For running it, compile the code first:

```
Expand All @@ -13,10 +15,6 @@ To launch a new VSCode window with the extension installed go to the `Run & Debu

This will open a new window where we can open our folder of choice, create a file with `.cypher` extension and start typing cypher helped by the language support.

## running through the terminal. If you have

Note: VSCode must be installed and the `code` executabble must be in your path.

## Plugin settings

For database aware features (such as autocompleting labels, procedure names, etc), you can connect to a running database (Aura, neo4j docker, etc) by tweaking the playground settings, in the opened window.
Expand Down

0 comments on commit f849e82

Please sign in to comment.