docs: documenting Myriad-Dreamin's workspace setting (#1264)

* docs: documenting Myriad-Dreamin's workspace setting

* chore: add eof new line
This commit is contained in:
Myriad-Dreamin 2025-02-08 13:41:18 +08:00 committed by GitHub
parent a778c8c10c
commit a82d96bc2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 103 additions and 0 deletions

View file

@ -24,6 +24,12 @@ To contribute to tinymist, you need to install the following tools:
- [Cargo](https://doc.rust-lang.org/cargo/) to develop Rust [crates](../crates/).
- [Yarn](https://yarnpkg.com/) to develop [VS Code extension](../editors/vscode/) or [tools](../tools/).
## Configure the Development Environment
You don't have to configure anything to start developing tinymist. However, here we provide some tips to make your development experience better.
- [@Myriad-Dreamin's VS Code Settings](#appendix-myriad-dreamins-vs-code-settings)
## Building and Running
To build tinymist LSP:
@ -121,3 +127,70 @@ To run e2e tests for tinymist on Windows:
The code owners and maintainers of the release channels can check the [Release Guide](/dev-guide/release-instruction.md) to learn how to check and release the new version of tinymist.
## APPENDIX: @Myriad-Dreamin's VS Code Settings
Applies the workspace settings template:
```
cp .vscode/tinymist.code-workspace.tmpl.json .vscode/tinymist.code-workspace.json
```
And then open the workspace in VS Code.
Rust Settings explained:
This configuration enables clippy on save:
```json
{
"rust-analyzer.check.command": "clippy",
}
```
This configuration wraps comments automatically:
```json
{
"rust-analyzer.rustfmt.extraArgs": ["--config=wrap_comments=true"],
}
```
This configuration excludes the `target` folder from the file watcher:
```json
{
"files.watcherExclude": {
"**/target": true
},
}
```
Typst Settings explained:
This configuration help use the same fonts as the CI building tinymist docs:
```json
{
"tinymist.fontPaths": [
"assets/fonts"
],
}
```
Formatter Settings explained:
This configuration runs formatters on save and using the `prettier` formatter:
```json
{
"[javascript]":{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
```