You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
I am on the latest stable version of the extension/LSP.
I have searched the issues of this repo and believe that this is not a duplicate.
Issue
On Emacs with the Eglot LSP client (after applying a workaround for #434), I configured typst-lsp to export onType with the following .dir-locals.el, but typst-lsp keeps exporting on save instead of on type:
;; The non-working configuration.
((nil. ((eglot-workspace-configuration
. (:typst-lsp (:exportPdf"onType"))))))
The above configuration for Eglot translates to the following call to didChangeConfiguration:
// The non-working call.{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"typst-lsp":{"exportPdf":"onType"}}}}
I read the code, and it seems like this line in lsp.rs calls config.update_by_map(&values) where values corresponds to {"typst-lsp":{"exportPdf":"onType"}} in the above JSON. However, in this line in config.rs it accesses the map with the key "exportPdf", instead of with "typst-lsp" first and then "exportPdf".
I modified my configuration to have the "exportPdf" key at the root, instead of under "typst-lsp", and it worked:
;; The working (but wrong) configuration.
((nil. ((eglot-workspace-configuration
. (:exportPdf"onType")))))
The above working config translates to:
// The working (but wrong) call.{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"exportPdf":"onType"}}}
I believe that this is a bug, as the configurations should be under the key "typst-lsp".
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Component:
LSP version:
0.13.0
from NixpkgsOS version and name: NixOS unstable
I am on the latest stable version of the extension/LSP.
I have searched the issues of this repo and believe that this is not a duplicate.
Issue
On Emacs with the Eglot LSP client (after applying a workaround for #434), I configured typst-lsp to export
onType
with the following.dir-locals.el
, but typst-lsp keeps exporting on save instead of on type:The above configuration for Eglot translates to the following call to
didChangeConfiguration
:I read the code, and it seems like this line in
lsp.rs
callsconfig.update_by_map(&values)
wherevalues
corresponds to{"typst-lsp":{"exportPdf":"onType"}}
in the above JSON. However, in this line inconfig.rs
it accesses the map with the key"exportPdf"
, instead of with"typst-lsp"
first and then"exportPdf"
.I modified my configuration to have the
"exportPdf"
key at the root, instead of under"typst-lsp"
, and it worked:The above working config translates to:
I believe that this is a bug, as the configurations should be under the key
"typst-lsp"
.The text was updated successfully, but these errors were encountered: