Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add info about tinymist and show how to pass initialization options to it #2473

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

istudyatuni
Copy link
Contributor

No description provided.

Copy link

netlify bot commented May 7, 2024

Deploy Preview for sublime-lsp ready!

Name Link
🔨 Latest commit cb16d7b
🔍 Latest deploy log https://app.netlify.com/sites/sublime-lsp/deploys/663a7d099fe2d30008936c8f
😎 Deploy Preview https://deploy-preview-2473--sublime-lsp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@istudyatuni istudyatuni marked this pull request as draft May 7, 2024 18:58
@istudyatuni istudyatuni marked this pull request as ready for review May 7, 2024 19:12
Comment on lines +783 to +789
"tinymist": {
// ...
"initializationOptions": {
"exportPdf": "never",
"typstExtraArgs": [],
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be confusing to show the tinymist object as a root object. You should have the parent clients here also, like in the previous snippet.

@@ -793,7 +807,7 @@ See [Javascript/TypeScript](#javascripttypescript).
<!-- how to call: see https://github.com/nvarner/typst-lsp/blob/master/editors/vscode/src/extension.ts -->
```jsonc title="Packages/User/Default.sublime-commands"
[
// ...
// typst-lsp:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// ... were supposed to signify that there might be other content in this file also.

Comment on lines +763 to +789
2. There are 2 available languages servers, and their configuration is mostly the same:
1. [tinymist](https://github.com/Myriad-Dreamin/tinymist) - has more features, like go to definition, rename, etc.
2. [typst-lsp](https://github.com/nvarner/typst-lsp/releases).
3. Open `Preferences > Package Settings > LSP > Settings` and add the `"typst-lsp"` client configuration to the `"clients"`:

```jsonc
{
"clients": {
"typst-lsp": {
"enabled": true,
"command": ["C:\\path\\to\\typst-lsp-win32-x64.exe"], // adjust this path according to your platform/setup
"command": ["path/to/typst-lsp"], // adjust this path according to your platform/setup
"selector": "text.typst"
}
}
}
```

If you want to provide some initialization options to tinymist, like exportPdf of typstExtraArgs, set it like

```jsonc
"tinymist": {
// ...
"initializationOptions": {
"exportPdf": "never",
"typstExtraArgs": [],
}
}
Copy link
Member

@rchl rchl May 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there exist two servers then this section should be refactored to have the ## Typst header and two separate ### ... sub headers for each server. See Python section for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants