neovim / nvim-lspconfig

Quickstart configs for Nvim LSP
Apache License 2.0
10.48k stars 2.06k forks source link

Neovim's new merge behavior for list tables breaks the way configurations are merged with the defaults #3323

Closed kmoschcau closed 1 week ago

kmoschcau commented 1 week ago

Description

Neovim's new merging behavior for list like table breaks how the configuration for some things in lspconfig works. For example instead of using the user provided filetypes property as-is, it is now merged with the default element by element. For example take stylelint_lsp's filetypes:

{
  "css",
  "less",
  "scss",
  "sugarss",
  "vue",
  "wxss",
  "javascript",
  "javascriptreact",
  "typescript",
  "typescriptreact"
 }

If I now want to remove everything from javascript onwards and add svelte, I have to provide a config like this:

  filetypes = {
    "css",
    "less",
    "scss",
    "sugarss",
    "vue",
    "wxss",
    "svelte",
    "",
    "",
    "",
  },

The way these configurations for lists are merged need to be fixed.

justinmk commented 1 week ago

what "new merge behavior" are you referring to? provide a reference, ideally an exact commit.

there was a tbl_deep_extend change for a few days on Nvim HEAD, that was reverted: https://github.com/neovim/neovim/pull/30309

kmoschcau commented 1 week ago

That was it. I only vaguely remembered reading it in the news.txt changes, but wasn't able to find it in my own version. Turns out my neovim version seems to be stuck on a version that had the original change but not the removal. I'm closing this.