docs: add notes to stateful pin commands (#562)

This commit is contained in:
Myriad-Dreamin 2024-08-26 21:41:09 +08:00 committed by GitHub
parent b2b9715218
commit a53b9d92d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 77 additions and 2 deletions

View file

@ -47,7 +47,11 @@ vim.lsp.buf.execute_command({ command = 'tinymist.pinMain', arguments = { vim.ap
vim.lsp.buf.execute_command({ command = 'tinymist.pinMain', arguments = { nil } })
```
There is also a plan to support multiple-file project by workspace configuration, but I dont know what is neovims way, so it needs further discussion.
There is also a plan to support multiple-file project by workspace configuration, but I dont know whether it is neovims way, so it needs further discussion.
#note-box[
`tinymist.pinMain` is a stateful command, and tinymist doesn't remember it between sessions (closing and opening the editor).
]
== Troubleshooting
<troubleshooting>

View file

@ -142,6 +142,10 @@ You can pin a main file by command.
- Use command `Typst Pin Main` (tinymist.pinMainToCurrent) to set the current file as the main file.
- Use command `Typst Unpin Main` (tinymist.unpinMain) to unset the main file.
#note-box[
`tinymist.pinMain` is a stateful command, and tinymist doesn't remember it between sessions (closing and opening the editor).
]
=== Passing Extra CLI Arguments
<passing-extra-cli-arguments>
There is a *global* configuration `tinymist.typstExtraArgs` to pass extra arguments to tinymist LSP, like what you usually do with `typst-cli` CLI. For example, you can set it to `["--input=awa=1", "--input=abaaba=2", "main.typ"]` to configure `sys.inputs` and entry for compiler, which is equivalent to make LSP run like a `typst-cli` with such arguments:

View file

@ -37,3 +37,5 @@
},
)
})
#let note-box = pro-tip