mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 02:08:17 +00:00
docs: add notes to stateful pin commands (#562)
This commit is contained in:
parent
b2b9715218
commit
a53b9d92d7
6 changed files with 77 additions and 2 deletions
|
@ -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 don’t know what is neovim’s way, so it needs further discussion.
|
||||
There is also a plan to support multiple-file project by workspace configuration, but I don’t know whether it is neovim’s 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>
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -37,3 +37,5 @@
|
|||
},
|
||||
)
|
||||
})
|
||||
|
||||
#let note-box = pro-tip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue