docs: maintain docs for tinymist 0.12.2 (#825)

This commit is contained in:
Myriad-Dreamin 2024-11-15 14:17:43 +08:00 committed by GitHub
parent da1e68ad1f
commit 9f36fea62b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 46 additions and 12 deletions

View file

@ -43,6 +43,7 @@ Language service (LSP) features:
- Or ctrl+click on a symbol.
- [Hover tips](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-hovers)
- Also known as "hovering tooltip".
- Render docs according to [tidy](https://github.com/Mc-Zen/tidy) style.
- [Inlay hints](https://www.jetbrains.com/help/idea/inlay-hints.html)
- Inlay hints are special markers that appear in the editor and provide you with additional information about your code, like the names of the parameters that a called method expects.
- [Color Provider](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-color-decorators)
@ -55,10 +56,12 @@ Language service (LSP) features:
- [Workspace Symbols](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-all-symbol-definitions-in-folder)
- [Code Action](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-code-actions)
- Increasing/Decreasing heading levels.
- Turn equation into "inline", "block" or "multiple-line block" styles.
- [experimental/onEnter](https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#on-enter)
- <kbd>Enter</kbd> inside triple-slash comments automatically inserts `///`
- <kbd>Enter</kbd> in the middle or after a trailing space in `//` inserts `//`
- <kbd>Enter</kbd> inside `//!` doc comments automatically inserts `//!`
- <kbd>Enter</kbd> inside equation markups automatically inserts indents.
Extra features:
@ -75,7 +78,7 @@ Extra features:
## Versioning and Release Cycle
Tinymist's versions follow the [Semantic Versioning](https://semver.org/) scheme, in format of `MAJOR.MINOR.PATCH`. Besides, tinymist follows special rules for the version number:
- If a version is suffixed with `-rcN` (<picture><source media="(prefers-color-scheme: dark)" srcset="./assets/images/introduction.typ-inlined0.svg"><img style="vertical-align: -0.35em" alt="typst-block" src="./assets/images/introduction.typ-inlined1.svg"/></picture>), e.g. `0.11.0-rc1` and `0.12.1-rc1`, it means this version is a release candidate. It is used to test publish script and E2E functionalities. These versions will not be published to the marketplace.
- If a version is suffixed with `-rcN` (<picture><source media="(prefers-color-scheme: dark)" srcset="./assets/images/introduction.typ-inlined0.svg"><img style="vertical-align: -0.35em" alt="typst-block" src="./assets/images/introduction.typ-inlined1.svg" /></picture>), e.g. `0.11.0-rc1` and `0.12.1-rc1`, it means this version is a release candidate. It is used to test publish script and E2E functionalities. These versions will not be published to the marketplace.
- If the `PATCH` number is odd, e.g. `0.11.1` and `0.12.3`, it means this version is a nightly release. The nightly release will use both [tinymist](https://github.com/Myriad-Dreamin/tinymist/tree/main) and [typst](https://github.com/typst/typst/tree/main) at **main branch**. They will be published as prerelease version to the marketplace.
- Otherwise, if the `PATCH` number is even, e.g. `0.11.0` and `0.12.2`, it means this version is a regular release. The regular release will always use the recent stable version of tinymist and typst.
@ -133,10 +136,12 @@ Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for contribution guideli
## Maintainers
Get list of maintainers from [MAINTAINERS.typ](MAINTAINERS.typ). Or programmatically by `yarn maintainers`
Get list of maintainers from [MAINTAINERS.typ](https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.typ). Or programmatically by `yarn maintainers`
> [!NOTE]
>
> You can add extra arguments for specific information. For example, `yarn maintainers --input="action=maintainers"`.
> [!TIP]
> You can add extra arguments for specific information. For example, `yarn maintainers --input="action=maintainers"`.
## Acknowledgements

View file

@ -1,5 +1,4 @@
<svg class="typst-doc" viewBox="0 0 30.168111111111113 17.413" width="30.168111111111113pt" height="17.413pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:h5="http://www.w3.org/1999/xhtml">
<path class="typst-shape" fill="#ffffff00" fill-rule="nonzero" d="M 0 0 L 0 17.413 L 30.168112 17.413 L 30.168112 0 Z "/>
<g>
<g transform="translate(0 12.463)">
<g class="typst-text" transform="scale(1, -1)">

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

View file

@ -1,5 +1,4 @@
<svg class="typst-doc" viewBox="0 0 30.168111111111113 17.413" width="30.168111111111113pt" height="17.413pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:h5="http://www.w3.org/1999/xhtml">
<path class="typst-shape" fill="#ffffff00" fill-rule="nonzero" d="M 0 0 L 0 17.413 L 30.168112 17.413 L 30.168112 0 Z "/>
<g>
<g transform="translate(0 12.463)">
<g class="typst-text" transform="scale(1, -1)">

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

View file

@ -29,6 +29,7 @@ Language service (LSP) features:
- Or ctrl+click on a symbol.
- #link("https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-hovers")[Hover tips]
- Also known as "hovering tooltip".
- Render docs according to #link("https://github.com/Mc-Zen/tidy")[tidy] style.
- #link("https://www.jetbrains.com/help/idea/inlay-hints.html")[Inlay hints]
- Inlay hints are special markers that appear in the editor and provide you with additional information about your code, like the names of the parameters that a called method expects.
- #link("https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-color-decorators")[Color Provider]
@ -41,10 +42,12 @@ Language service (LSP) features:
- #link("https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-all-symbol-definitions-in-folder")[Workspace Symbols]
- #link("https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-code-actions")[Code Action]
- Increasing/Decreasing heading levels.
- Turn equation into "inline", "block" or "multiple-line block" styles.
- #link("https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#on-enter")[experimental/onEnter]
- #kbd("Enter") inside triple-slash comments automatically inserts `///`
- #kbd("Enter") in the middle or after a trailing space in `//` inserts `//`
- #kbd("Enter") inside `//!` doc comments automatically inserts `//!`
- #kbd("Enter") inside equation markups automatically inserts indents.
Extra features:

View file

@ -87,6 +87,14 @@ Nightly Channel:
Please read the #link("CONTRIBUTING.md")[CONTRIBUTING.md] file for contribution guidelines.
== Maintainers
Get list of maintainers from #link("https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.typ")[MAINTAINERS.typ]. Or programmatically by `yarn maintainers`
#note-box[
You can add extra arguments for specific information. For example, `yarn maintainers --input="action=maintainers"`.
]
== Acknowledgements
- Partially code is inherited from #link("https://github.com/nvarner/typst-lsp")[typst-lsp]

View file

@ -15,21 +15,24 @@ From the directory structure of `crates/tinymist`, the `main.rs` file parses the
```rust
match args.command.unwrap_or_default() {
Commands::Query(query_cmds) => query_main(query_cmds),
Commands::Lsp(args) => lsp_main(args),
Commands::Compile(args) => compiler_main(args),
Commands::TraceLsp(args) => trace_lsp_main(args),
Commands::Preview(args) => tokio_runtime.block_on(preview_main(args)),
Commands::Probe => Ok(()),
}
```
The `query` subcommand contains the query commands, which are used to perform language queries via cli, which is convenient for debugging and profiling single query of the language server.
There are three servers in the `server` directory:
- `lsp.rs` provides the language server, initialized by `lsp_init.rs` and owns commands in `lsp_cmd.rs`.
- `compiler.rs` provides the compiler server, initialized by `compiler_init.rs` and owns commands in `compiler_cmd.rs`.
- `preview.rs` provides a `typst-preview` compatible preview server.
- `lsp` provides the language server, initialized by `lsp_main` in `main.rs`.
- `trace` provides the trace server (profiling typst programs), initialized by `trace_lsp_main` in `main.rs`.
- `preview` provides a `typst-preview` compatible preview server, initialized by `preview_main` in `tool/preview.rs`.
The long-running servers are contributed by the modules in the `server` directory.
The long-running servers are contributed by the `LanguageState` in the `server.rs` file.
They will bootstrap actors in the `actor` directory.
They will bootstrap actors in the `actor` directory and start tasks in the `task` directory.
They can construct and return resources in the `resource` directory.

View file

@ -34,6 +34,13 @@ Enable or disable semantic tokens (LSP syntax highlighting)
- `disable`: Do not use semantic tokens for syntax highlighting
- **Default**: `"enable"`
## `tinymist.typingContinueCommentsOnNewline`
Whether to prefix newlines after comments with the corresponding comment prefix.
- **Type**: `boolean`
- **Default**: `true`
## `tinymist.onEnterEvent`
Enable or disable [experimental/onEnter](https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#on-enter) (LSP onEnter feature) to allow automatic insertion of characters on enter, such as `///` for comments. Note: restarting the editor is required to change this setting.
@ -121,6 +128,16 @@ Whether to handle drag-and-drop of resources into the editing typst document. No
- `disable`
- **Default**: `"enable"`
## `tinymist.renderDocs`
(Experimental) Whether to render typst elements in (hover) docs. In VS Code, when this feature is enabled, tinymist will store rendered results in the filesystem's temporary storage to show them in the hover content. Note: Please disable this feature if the editor doesn't support/handle image previewing in docs.
- **Type**: `string`
- **Enum**:
- `enable`
- `disable`
- **Default**: `"enable"`
## `tinymist.previewFeature`
Enable or disable preview features of Typst. Note: restarting the editor is required to change this setting.