tinymist icon indicating copy to clipboard operation
tinymist copied to clipboard

langauge server configuration entries should be children of the top-most entry `tinymist`

Open Ziqi-Yang opened this issue 6 months ago • 7 comments

Note: I'm not talking about initialization options, but settings.

I have read the tinymist language server configuration doc. It has configuration entries like outputPath directly on the top-most level, i.e.

outputPath
exportPdf
...

However, many other language servers like rust-analyzer, python language server, gopls uses rust-analyzer, pylsp, gopls as the top-most entry of their setting respectively. That's to say:

tinymist
├── outputPath
├── exportPdf
...

Currently, I have to configure Emacs like this to successfully customize Tinymis (though I know I can also specify the initialization option to configure it):

  (setq-default eglot-workspace-configuration
                '(:exportPdf "onSave"))

Instead of this:

(setq-default eglot-workspace-configuration
              '((:pylsp . (:plugins (:ruff (:enabled t))))
                (:tinymist (:exportPdf "onSave"))))

You can see the difference. If I want to customize tinymist, then I need to discard all configurations for other language servers, since eglot-workspace-configuration is directly passed into tinymist as a whole (the following log corresponds to the first one configuration style):

[2024-08-15T06:14:48Z INFO  tinymist::init] preferred theme: None {"exportPdf": String("onSave")}
[2024-08-15T06:14:48Z INFO  tinymist::server] new settings applied

I believe having tinymist as the top-most level configuration entry is meaningful - maybe it enables multiple language servers working?

Ziqi-Yang avatar Aug 15 '24 08:08 Ziqi-Yang