-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for extension publishing (#180)
* prep for vscode * readme cleanup * touchups * wording * self reivew * self reivew * self reivew * fix crash * renames settings * clarity * rename to connectionURL * review * rename setting * fix lock file * updatebuildscript * also include lang config
- Loading branch information
1 parent
7f3e3ff
commit 2cd3281
Showing
14 changed files
with
96 additions
and
61 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,13 +1,13 @@ | ||
dist/ | ||
!dist/extension.js | ||
!dist/cypher-language-server.js | ||
# Ignore everything, https://github.com/microsoft/vscode-vsce/issues/12 | ||
** | ||
# Required for the ignore everything rule to work from testing | ||
../../ | ||
../ | ||
node_modules | ||
out/ | ||
src/ | ||
e2e_tests/ | ||
tsconfig.json | ||
webpack.config.js | ||
.turbo | ||
.vscode | ||
|
||
# Unignore only required files, readme/package.json automatically included | ||
!LICENSE.md | ||
!images/ | ||
!dist/extension.js | ||
!dist/lintWorker.js | ||
!dist/cypher-language-server.js | ||
!cypher-language-configuration.json |
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,37 +1,44 @@ | ||
# VSCode Extension | ||
# Neo4j for VS Code Preview | ||
|
||
This is a VScode extension playground for testing the Cypher language server. | ||
## Getting started | ||
|
||
It's not yet published on the VSCode Marketplace, so to test it you need to run it locally. | ||
After installing the extension from the VS Code Marketplace, open a file with a `.cypher` to start using the extension. To enable database aware features (such as completing labels/functions), set up a connection to a Neo4j instance using the settings described in the settings section below. | ||
|
||
For running it, compile the code first: | ||
## Feature Highlights | ||
|
||
``` | ||
npm install | ||
npm run build | ||
``` | ||
Our extension preview provides a rich set of features for working with Cypher, the query language for Neo4j databases, including: | ||
|
||
To launch a new VSCode window with the extension installed go to the `Run & Debug` tab (normally in the left pannel), select and run `VSCode Playground` clicking on the play ▷ button. | ||
- Syntax highlighting | ||
- Syntax checking - both simple and semantic errors (e.g. type errors, unknown labels, etc) | ||
- Autocompletion for Cypher keywords, functions, labels, properties, database names and more | ||
- Signature help for functions - shows the signature of the function while typing | ||
|
||
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. | ||
![demo-gif](https://github.com/neo4j/cypher-language-support/blob/main/packages/vscode-extension/images/demo.gif?raw=true) | ||
|
||
## Plugin settings | ||
## Upcoming features | ||
|
||
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. | ||
We're working on adding more features to the extension, such as: | ||
|
||
The following settings are available in VSCode once the plugin is installed, which can be set either through the `Settings` menu on VSCode or by creating a `.vscode/settings.json` file in the window opened by the play button. | ||
- Easier database connection management | ||
- Embedded cypher support in other file types | ||
- Query exectution and result visualization | ||
- Automatic query formatting | ||
|
||
### Settings for database connection | ||
## Extension settings | ||
|
||
The following settings refer to the database connection used for signature loading, this will allow for autocomplete on Labels and Types. | ||
The following settings are available in VS Code once the plugin is installed, which can be set either through the `Settings` menu on VS Code or by editing your `.vscode/settings.json` file. | ||
|
||
- `cypherLSP.neo4j.connect`: If true it will attempt to connect to a Neo4j database to retrieve signature information. Defaults to `true`. | ||
- `cypherLSP.neo4j.user`: Defaults to `"neo4j"` | ||
- `cypherLSP.neo4j.password`: Defaults to `"password"` | ||
- `cypherLSP.neo4j.URL`: Defaults to `"bolt://localhost:7687"` | ||
|
||
![](../../imgs/vscode-playground.png) | ||
- `neo4j.connect`: If true it will attempt to connect to a Neo4j database to retrieve data used for completions. Defaults to `true` | ||
- `neo4j.connectURL`: Defaults to `"neo4j://localhost:7687"`, the default url for connecting a local Neo4j instance over websocket via the `bolt` protocol | ||
- `neo4j.user`: Defaults to `"neo4j"`, the default user for a local Neo4j instance | ||
- `neo4j.password`: Replace this with the password for the user above | ||
|
||
### Debug | ||
|
||
- `cypherLSP.trace.server`: Traces the communication between VS Code and the language server for debugging purposes. | ||
- `neo4j.trace.server`: Traces the communication between VS Code and the language server for debugging purposes | ||
|
||
## Contributing | ||
|
||
We welcome your suggestions, ideas, bug reports and contributions on our [github](https://github.com/neo4j/cypher-language-support). | ||
|
||
To build the project locally, see the [CONTRIBUTING.md](https://github.com/neo4j/cypher-language-support/blob/main/CONTRIBUTING.md) file at the root of the git repository. |
2 changes: 1 addition & 1 deletion
2
packages/vscode-extension/e2e_tests/fixtures/.vscode/settings-template.json
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,7 +1,7 @@ | ||
{ | ||
"neo4j.connect": true, | ||
"neo4j.password": "{PASSWORD}", | ||
"neo4j.URL": "neo4j://localhost:{PORT}", | ||
"neo4j.connectURL": "neo4j://localhost:{PORT}", | ||
"neo4j.user": "neo4j", | ||
"neo4j.trace.server": "off" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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