taplo icon indicating copy to clipboard operation
taplo copied to clipboard

LSP server does not set config_file.path properly.

Open dsully opened this issue 1 year ago • 3 comments

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?

dsully avatar Feb 17 '24 22:02 dsully