diff options
| author | Vlad <52591095+MeanderingProgrammer@users.noreply.github.com> | 2025-10-31 20:05:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-31 20:05:41 -0700 |
| commit | 9a955d0ace469762523b8cf39dd7db31a061e090 (patch) | |
| tree | 93d83991e9b3e432bf68f25de76a3129bc3a5b77 /lsp | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.tar nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.tar.gz nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.tar.bz2 nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.tar.lz nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.tar.xz nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.tar.zst nvim-lspconfig-9a955d0ace469762523b8cf39dd7db31a061e090.zip | |
fix(tinymist): vim.notify called with invalid input #4172
Problem:
The various `tinymist` export commands like `LspTinymistExportPdf` used
to output simple path strings. With the release of `v0.13.30` the output
is now a structure like `{ path = "..." }`. Other export commands have
slightly different outputs. Calling `vim.notify` with this input leads
to `Error executing vim.schedule lua callback: vim/_editor.lua:0: ...`.
Solution:
Pass the result of all commands to `vim.inspect`.
Update the list of workspace commands in the brief.
Diffstat (limited to 'lsp')
| -rw-r--r-- | lsp/tinymist.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lsp/tinymist.lua b/lsp/tinymist.lua index 946cfa90..44598c64 100644 --- a/lsp/tinymist.lua +++ b/lsp/tinymist.lua @@ -4,11 +4,11 @@ --- An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese. --- --- Currently some of Tinymist's workspace commands are supported, namely: ---- `LspTinymistExportSvg`, `LspTinymistExportPng`, `LspTinymistExportPdf +--- `LspTinymistExportSvg`, `LspTinymistExportPng`, `LspTinymistExportPdf`, --- `LspTinymistExportMarkdown`, `LspTinymistExportText`, `LspTinymistExportQuery`, --- `LspTinymistExportAnsiHighlight`, `LspTinymistGetServerInfo`, ---- `LspTinymistGetDocumentTrace`, `LspTinymistGetWorkspaceLabels`, and ---- `LspTinymistGetDocumentMetrics`. +--- `LspTinymistGetDocumentTrace`, `LspTinymistGetWorkspaceLabels`, +--- `LspTinymistGetDocumentMetrics`, and `LspTinymistPinMain`. ---@param command_name string ---@param client vim.lsp.Client @@ -27,8 +27,7 @@ local function create_tinymist_command(command_name, client, bufnr) if err then return vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR) end - -- If exporting, show the string result; else, show the table for inspection - vim.notify(export_type and res or vim.inspect(res), vim.log.levels.INFO) + vim.notify(vim.inspect(res), vim.log.levels.INFO) end return client:exec_cmd({ title = title_str, |
