Skip to content

Commit

Permalink
add readme to vscode extension
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Jan 24, 2024
1 parent 8dcdabf commit 6028e3c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
4 changes: 4 additions & 0 deletions vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# main

# 0.3.2

- Add readme.

# 0.3.1

- Tidy up query pasting.
Expand Down
36 changes: 36 additions & 0 deletions vscode-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# vscode-rescript-edgedb

`rescript-edgedb` comes with this dedicated [VSCode extension](https://marketplace.visualstudio.com/items?itemName=GabrielNordeborn.vscode-rescript-edgedb) designed to enhance the experience of using ReScript and EdgeDB together. Below is a list of how you use it, and what it can do.

> NOTE: Make sure you install the [official EdgeDB extension](https://marketplace.visualstudio.com/items?itemName=magicstack.edgedb) as well, so you get syntax highlighting and more.
### Snippets

Snippets for easily adding new `%edgeql` blocks are included:

![snippets](https://github.com/zth/rescript-edgedb/assets/1457626/8dc1c54b-470d-4dee-9598-e26d35632286)

These appear as soon as you start writing `%edgeql` in a ReScript file.

### In editor error messages

Any errors for your EdgeQL queries will show directly in your ReScript files that define them:

![in-editor-errors](https://github.com/zth/rescript-edgedb/assets/1457626/19f6bf01-5648-4354-b510-881ed9b05c3a)

### Easily edit queries in the dedicated EdgeDB UI

You can easily open the local EdgeDB UI, edit your query in there (including running it, etc), and then insert the modified query back:

![open-in-edgedb-ui](https://github.com/zth/rescript-edgedb/assets/1457626/e4dca50c-de60-4a78-8de9-f195a2cfd88d)

It works like this:

1. Put the cursor in the query you want to edit.
2. Activate code actions.
3. Select the code action for opening the EdgeDB UI and copying the query.
4. The local EdgeDB query editor UI will now open in your browser, and the EdgeQL query you had your cursor in will be copied to your clipboard.
5. Paste the query into the query editor and make the edits you want.
6. Copy the entire query text and go back to VSCode and the file which has your query.
7. Activate code actions again and select the code action for inserting your modified query.
8. Done!
4 changes: 2 additions & 2 deletions vscode-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vscode-rescript-edgedb",
"description": "Improve quality-of-life of using EdgeDB in ReScript with VSCode.",
"version": "0.3.1",
"version": "0.3.2",
"main": "./build/extension.js",
"engines": {
"vscode": "^1.77.0"
Expand Down

0 comments on commit 6028e3c

Please sign in to comment.