Skip to content

Commit

Permalink
Merge pull request #44 from tidbcloud/chore/refine-doc
Browse files Browse the repository at this point in the history
chore: refine READMEs
  • Loading branch information
baurine authored Jul 3, 2024
2 parents 3331398 + f718f4e commit ad7ad9e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This package provides the `SQLEditorInstance` and `EditorCache` implementation.

`SQLEditorInstance` creates EditorView instance with pre-configured extensions to make it available to edit SQL code.
`SQLEditorInstance` creates EditorView instance with pre-configured extensions to make it available to edit SQL code, likes `@codemirror/lang-sql`, `@tidbcloud/codemirror-extension-sql-parser`, `@tidbcloud/codemirror-extension-cur-sql`.

`EditorCache` stores the `SQLEditorInstance` in a map.

Expand Down
6 changes: 3 additions & 3 deletions packages/extensions/ai-widget/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @tidbcloud/codemirror-extension-ai-widget

A codemirror extension provides a widget to chat with AI to help you write or refine SQL. (work with other languages wip)
A codemirror extension provides a widget to chat with AI to help you write or refine SQL. (will support to work with other languages later)

https://github.com/tidbcloud/tisqleditor/assets/1284531/46684333-7efa-4925-bf58-9ab3fb45f692

Expand All @@ -22,10 +22,10 @@ https://github.com/tidbcloud/tisqleditor/assets/1284531/46684333-7efa-4925-bf58-
npm install @tidbcloud/codemirror-extension-ai-widget
```

You need to install its peer dependencies as well:
You need to install its dependencies as well:

```shell
npm install @codemirror/view @codemirror/state @codemirror/merge @codemirror/lang-sql
npm install @codemirror/view @codemirror/state @codemirror/merge @codemirror/lang-sql @tidbcloud/codemirror-extension-sql-parser @tidbcloud/codemirror-extension-cur-sql
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/cur-sql-gutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ A codemirror extension listens the editor selection change, and shows gutter for
npm install @tidbcloud/codemirror-extension-cur-sql-gutter
```

You need to install its peer dependencies as well:
You need to install its dependencies as well:

```shell
npm install @codemirror/view @codemirror/state @codemirror/lang-sql
npm install @codemirror/view @codemirror/state @codemirror/lang-sql @tidbcloud/codemirror-extension-sql-parser @tidbcloud/codemirror/extension-cur-sql
```

## Usage
Expand Down
6 changes: 2 additions & 4 deletions packages/extensions/cur-sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ This extension is installed internally inside the `SQLEditorInstance`.
npm install @tidbcloud/codemirror-extension-cur-sql
```

It will auto install `@tidbcloud/codemirror-extension-sql-parser` as its dependency.

You need to install its peer dependencies as well:
You need to install its dependencies as well:

```shell
npm install @codemirror/view @codemirror/state @codemirror/language @codemirro/lang-sql
npm install @codemirror/view @codemirror/state @codemirror/language @codemirror/lang-sql @tidbcloud/codemirror-extension-sql-parser
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
npm install @tidbcloud/codemirror-extension-linters
```

You need to install its peer dependencies as well:
You need to install its dependencies as well:

```shell
npm install @codemirror/view @codemirror/state @codemirror/lint @codemirror/lang-sql
npm install @codemirror/view @codemirror/state @codemirror/lint @codemirror/lang-sql @tidbcloud/codemirror-extension-sql-parser
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ export function OpenedFilesTabs() {
- `doc`: editor initial content
- `sqlConfig`: config for SQL dialect, schemas, tables
- `theme`: editor theme, `@tidbcloud/codemirror-extensions-themes` provides 2 simple themes, `bbedit` for light mode, `oneDark` for dark mode, you can choose any other themes from third-party libraries or customize it by self
- `extraExts`: any other extra CodeMirror extensions you want to use, `@tidbcloud/tisqleditor-react` install some builtin extensions, likes `@tidbcloud/codemirror-extension-sql-parser`, `@tidbcloud/codemirror-extension-cur-sql`
- `extraExts`: any other extra CodeMirror extensions you want to use, `@tidbcloud/tisqleditor-react` install some builtin extensions, likes `@codemirror/lang-sql`, `@tidbcloud/codemirror-extension-sql-parser`, `@tidbcloud/codemirror-extension-cur-sql`

0 comments on commit ad7ad9e

Please sign in to comment.