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

docs: add info about typst-lsp commands #2424

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/src/language_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ See [Javascript/TypeScript](#javascripttypescript).
}
}
```

4. Optional: to enable auto-completions for the relevant situations in Typst files, adjust Sublime's `"auto_complete_selector"` and/or `"auto_complete_triggers"` setting (`Preferences > Settings`); for example

```jsonc
Expand All @@ -751,6 +752,33 @@ See [Javascript/TypeScript](#javascripttypescript).
}
```

5. Optional: to enable some useful commands provided by language server, add the following to the `*.sublime-commands`:

<!-- how to call: see https://github.com/nvarner/typst-lsp/blob/master/editors/vscode/src/extension.ts -->
```jsonc title="Packages/User/Default.sublime-commands"
[
// ...
{
"caption": "typst-lsp - Pin the main file to the currently opened document",
"command": "lsp_execute",
"args": {
"session_name": "typst-lsp",
"command_name": "typst-lsp.doPinMain",
"command_args": ["${file_uri}"]
}
},
{
"caption": "typst-lsp - Unpin the main file",
"command": "lsp_execute",
"args": {
"session_name": "typst-lsp",
"command_name": "typst-lsp.doPinMain",
"command_args": ["detached"]
}
},
rchl marked this conversation as resolved.
Show resolved Hide resolved
]
```

## Vue

There are multiple options:
Expand Down