taplo
taplo copied to clipboard
LSP server does not set config_file.path properly.
Given this LSP configuration to taplo lsp I would expect the config_file.path to be set properly via workspace/didChangeConfiguration
settings = {
taplo = {
config_file = {
enabled = true,
path = vim.env.XDG_CONFIG_HOME .. "/taplo.toml",
},
},
}
However, there appears to be a deserialization issue into Figment where the enabled boolean comes across, but the path into a Option<PathBuf> in struct LspConfig does not.
I tried debugging this for a while, and if I set the path manually in the code after the Figment merge, it worked. I checked that the incoming data was correct (coming in as a String("/some/path")) as well.
Related - Is there a reason that taplo lsp doesn't accept a --config argument?