Skip to content

Commit

Permalink
docs: documenting Myriad-Dreamin's workspace setting (#1264)
Browse files Browse the repository at this point in the history
* docs: documenting Myriad-Dreamin's workspace setting

* chore: add eof new line
  • Loading branch information
Myriad-Dreamin authored Feb 8, 2025
1 parent a778c8c commit a82d96b
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .vscode/tinymist.code-workspace.tmpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "vscode://schemas/workspaceConfig",
"folders": [
{
"path": ".."
}
],
"settings": {
"tinymist.fontPaths": [
"assets/fonts"
],
"[javascript]":{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.format.enable": true,
"eslint.workingDirectories": [
"editors/vscode"
],
"rust-analyzer.check.command": "clippy",
"rust-analyzer.rustfmt.extraArgs": ["--config=wrap_comments=true"],
"files.watcherExclude": {
"**/target": true
},
},
}
73 changes: 73 additions & 0 deletions docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
},
}
```

0 comments on commit a82d96b

Please sign in to comment.