astrocommunity icon indicating copy to clipboard operation
astrocommunity copied to clipboard

fix(nvim-vtsls): adding 'typescript-svelte-plugin' in vtsls globalPlugins

Open shubham-cpp opened this issue 1 month ago • 1 comments

📑 Description

  • Add typescript-svelte-plugin as a global plugin for vtsls. Same as lazyvim/svelte.ts config
  • For the vue's config, I've removed the default empty setting for globalPlugins = {},. Because of this if you had community.lua config like below where pack.svelte is above pack.vue this would result in typescript-svelte-plugin not being added.
-- lua/community.lua
---@type LazySpec 
return {
  "AstroNvim/astrocommunity",
  { import = "astrocommunity.pack.svelte" },
  { import = "astrocommunity.pack.vue" }
}

📖 Additional Information

How to verify:

  1. git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim-astro-demo
  2. NVIM_APPNAME=nvim-astro-demo nvim
  3. Update the community.lua with following content
-- lua/community.lua
---@type LazySpec
return {
  "AstroNvim/astrocommunity",
  -- you could also put the svelte below vue
  { import = "astrocommunity.pack.svelte" },
  { import = "astrocommunity.pack.vue" },
}
  1. Open a svelte project(or create new npx sv create demo-svelte-app --template minimal --types ts
  2. Open any .ts file, run :LspInfo and check globalPlugins table has the typescript-svelte-plugin plugin

shubham-cpp avatar Nov 12 '25 09:11 shubham-cpp

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • [x] Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • [x] README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • [x] Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • [x] Proper usage of opts table rather than setting things up with the config function.

  • [x] Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

github-actions[bot] avatar Nov 12 '25 09:11 github-actions[bot]

Removed your vue changes. Feel free to add that in a seperate PR.

Uzaaft avatar Nov 15 '25 10:11 Uzaaft