AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.21k stars 240 forks source link

Typescript pack results in runtime error #278

Closed samtay closed 1 year ago

samtay commented 1 year ago

This was working, but all of a sudden (presumably after some update of packages) now when I open TS files I just see this:

Failed to run `config` for typescript.nvim

/home/sam/.config/nvim/lua/astronvim/utils/lsp.lua:387: attempt to index field 'document_config' (a nil value)

# stacktrace:
  - ~/.config/nvim/lua/astronvim/utils/lsp.lua:387 _in_ **config**
  - /astrocommunity/lua/astrocommunity/pack/typescript/typescript.lua:115 _in_ **values**
  - /usr/share/nvim/runtime/filetype.lua:22
  - /usr/share/nvim/runtime/filetype.lua:21

and the LSP fails to start.

This is just using a vanilla config: { import = "astrocommunity.pack.typescript" },

samtay commented 1 year ago

This is caused by some conflict in the typescript and dart packs. A minimal reproducible example is to take a fresh astrovim config from https://github.com/AstroNvim/user_example and change plugins/community.lua to:

return {
  -- Add the community repository of plugin specifications
  "AstroNvim/astrocommunity",
  -- example of imporing a plugin, comment out to use it or add your own
  -- available plugins can be found at https://github.com/AstroNvim/astrocommunity

  -- { import = "astrocommunity.colorscheme.catppuccin" },
  { import = "astrocommunity.pack.typescript" },
  { import = "astrocommunity.pack.dart" },
}
Uzaaft commented 1 year ago

I can't reproduce locally. Got both pack's enabled in my config

Uzaaft commented 1 year ago

Nor do I get the issue when using the Minimal rep. example from your post. Have you updated all packages, including all mason stuff?

samtay commented 1 year ago

Wow, that is bizarre. Yes, I'm up to date on everything. And when I used the minimal example I cleaned and synced the plugins and pakages. I'm on arch linux, don't know what else would be relevant :shrug:

Uzaaft commented 1 year ago

Let me test on arch

Uzaaft commented 1 year ago

Managed to recreate in Arch

Uzaaft commented 1 year ago

Managed to Get this issue on Mac now

Uzaaft commented 1 year ago

This seems to be an issue with typescript.nvim based upon my chat with mehalter in #dev in discord

Uzaaft commented 1 year ago

Actually, it's the other way around. flutter-tools seems to affect the lsp setup. 🤣

mehalter commented 1 year ago

Nah, neither of the plugins are broken. The dart pack is very broken here

Uzaaft commented 1 year ago

hey I was trying to live report your findings 🤣 The log here is just an transcription