-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
langauge server configuration entries should be children of the top-most entry tinymist
#533
Comments
Can emacs put entries under tinymist/editors/neovim/plugins/tinymist.lua Lines 28 to 29 in 68911d9
Btw, you can try tinymist/crates/tinymist/src/init.rs Lines 288 to 290 in 68911d9
|
Emacs have many lsp client implementations, such as
This can work (corresponding to (setq-default eglot-workspace-configuration
'(:pylsp (:plugins (:ruff (:enabled t)))
:exportPdf "onSave")) And this is its log:
But this cannot: (corresponding to (setq-default eglot-workspace-configuration
'(
:pylsp (:plugins (:ruff (:enabled t)))
:tinymist (:exportPdf "onSave"))) And this is its log:
|
I'm confused because I don't know whether when we add a -- add tinymist to lspconfig
{
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
tinymist = {
settings = {
tinymist = { exportPdf = "onTyped" }
}
},
},
},
}, On the path, |
gopls also have local lspconfig = require("lspconfig")
lspconfig.gopls.setup({
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
gofumpt = true,
},
},
}) Though I don't think it's mandatory. And there may also be some or many language servers don't use its name as the top-level entry beyond my preliminary investigation. If you don't like to add an top-level entry/namespace, it's absolutely OK. The reason I propose it is because that setting it in Emacs |
I think of it reasonable to detect whether there is a settings = {
tinymist = { exportPdf = "onTyped" } -- priority: high
'tinymist.exportPdf' = "onTyped" -- priority: middle
exportPdf = "onTyped" -- priority: low
} It requires server changes. Three styles look a bit unclear but we can collect all voices for break change. The only thing must be ensured is not to disturb users from other editors. |
Btw, I think it is probably a design defect of |
To add README for emacs, you can update this file. tinymist/scripts/link-docs.mjs Lines 42 to 51 in 63ade4f
And run:
If you don't have node runtime, you can just update the script and add a typ file. I'll run the script them. |
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.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: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):
Instead of this:
You can see the difference. If I want to customize
tinymist
, then I need to discard all configurations for other language servers, sinceeglot-workspace-configuration
is directly passed intotinymist
as a whole (the following log corresponds to the first one configuration style):I believe having
tinymist
as the top-most level configuration entry is meaningful - maybe it enables multiple language servers working?The text was updated successfully, but these errors were encountered: