mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 10:18:16 +00:00
docs: update readme and docs about linting (#1714)
* docs: update readme about linting * docs: update documentation
This commit is contained in:
parent
0552d4bb4f
commit
c869cde2c5
6 changed files with 44 additions and 2 deletions
|
@ -27,6 +27,7 @@
|
|||
- #chapter("feature/export.typ")[Exporting Documents]
|
||||
- #chapter("feature/preview.typ")[Document Preview]
|
||||
- #chapter("feature/testing.typ")[Testing]
|
||||
- #chapter("feature/linting.typ")[Linting]
|
||||
- #chapter("feature/language.typ")[Other Features]
|
||||
= Service Overview
|
||||
#prefix-chapter("overview.typ")[Overview of Service]
|
||||
|
|
|
@ -54,6 +54,7 @@ Extra features:
|
|||
- Compiles to PDF on save (configurable to as-you-type, or other options). Check #cross-link("/feature/export.typ")[Docs: Exporting Documents].
|
||||
- Also compiles to SVG, PNG, HTML, Markdown, Text, and other formats by commands, vscode tasks, or code lenses.
|
||||
- Provides test, benchmark, coverage collecting on documents and modules. Check #cross-link("/feature/testing.typ")[Docs: Testing Features].
|
||||
- Provides builtin linting. Check #cross-link("/feature/linting.typ")[Docs: Linting Features].
|
||||
- Provides a status bar item to show the current document's compilation status and words count.
|
||||
- #link("https://github.com/Myriad-Dreamin/tinymist/tree/main/tools/editor-tools")[Editor tools]:
|
||||
- View a list of templates in template gallery. (`tinymist.showTemplateGallery`)
|
||||
|
|
24
docs/tinymist/feature/linting.typ
Normal file
24
docs/tinymist/feature/linting.typ
Normal file
|
@ -0,0 +1,24 @@
|
|||
#import "mod.typ": *
|
||||
|
||||
#show: book-page.with(title: [Linting Feature])
|
||||
|
||||
The linting feature is available since `tinymist` v0.13.12.
|
||||
|
||||
If enabled, the linter will run on save or on type, depending on your configuration. When it finishes, the language server will send the results along with the compilation diagnostics to the editor.
|
||||
|
||||
=== Configuring in VS Code
|
||||
+ Open settings.
|
||||
+ Search for "Tinymist Lint" and modify the value.
|
||||
+ Toggle "Enabled" to enable or disable the linter.
|
||||
+ Change "When" to configure when the linter runs.
|
||||
- (Default) `onSave` run linting when you save the file.
|
||||
- `onType` run linting as you type.
|
||||
|
||||
=== Configuring in Other Editors
|
||||
|
||||
+ Change configuration `tinymist.lint.enabled` to `true` to enable the linter.
|
||||
+ Change configuration `tinymist.lint.when` to `onSave` or `onType` to configure when the linter runs.
|
||||
- (Default) `onSave` run linting when you save the file.
|
||||
- `onType` run linting as you type.
|
||||
|
||||
|
|
@ -41,6 +41,15 @@ Tips: to enable formatting on save, you should add extra settings for typst lang
|
|||
}
|
||||
```
|
||||
|
||||
=== Configuring Linter
|
||||
<configuring-linter>
|
||||
+ Open settings.
|
||||
+ Search for "Tinymist Lint" and modify the value.
|
||||
+ Toggle "Enabled" to enable or disable the linter.
|
||||
+ Change "When" to configure when the linter runs.
|
||||
- (Default) `onSave` run linting when you save the file.
|
||||
- `onType` run linting as you type.
|
||||
|
||||
=== Configuring/Using Tinymist’s Activity Bar (Sidebar)
|
||||
<configuringusing-tinymists-activity-bar-sidebar>
|
||||
If you don’t like the activity bar, you can right-click on the activity bar and uncheck "Tinymist" to hide it.
|
||||
|
|
|
@ -93,7 +93,6 @@ To encourage contributions, we create many #link("https://github.com/Myriad-Drea
|
|||
We are planning to implement the following features in typst v0.14.0 or spare time in weekend:
|
||||
|
||||
- Type checking: complete the type checker.
|
||||
- Static Linter: linting code statically according to feedback of the type checker and succeeding code analysis.
|
||||
- Periscope renderer: It is disabled since vscode reject to render SVGs containing foreignObjects.
|
||||
- Inlay hint: It is disabled _by default_ because of performance issues.
|
||||
- Find references of dictionary fields and named function arguments.
|
||||
|
@ -107,7 +106,6 @@ We are planning to implement the following features in typst v0.14.0 or spare ti
|
|||
- Search labels.
|
||||
- Keep (persist) group preferences.
|
||||
- Improve Typst Preview.
|
||||
- Preview for all editors: See #link("https://github.com/Myriad-Dreamin/tinymist/issues/1237")[Issue 1237].
|
||||
- Pin drop-down: Set the file to preview in the drop-down for clients that doesn't support passing arguments to the preview command.
|
||||
- Render in web worker (another thread) to reduce overhead on the electron's main thread.
|
||||
- #strike[Spell checking: There is already a branch but no suitable (default) spell checking library is found.]
|
||||
|
|
|
@ -40,6 +40,15 @@ Tips: to enable formatting on save, you should add extra settings for typst lang
|
|||
}
|
||||
```
|
||||
|
||||
### Configuring Linter
|
||||
|
||||
1. Open settings.
|
||||
1. Search for "Tinymist Lint" and modify the value.
|
||||
1. Toggle "Enabled" to enable or disable the linter.
|
||||
1. Change "When" to configure when the linter runs.
|
||||
- (Default) `onSave` run linting when you save the file.
|
||||
- `onType` run linting as you type.
|
||||
|
||||
### Configuring/Using Tinymist’s Activity Bar (Sidebar)
|
||||
|
||||
If you don’t like the activity bar, you can right-click on the activity bar and uncheck "Tinymist" to hide it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue