Skip to content

Conversation

@shubham-cpp
Copy link
Contributor

📑 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

@github-actions
Copy link

github-actions bot commented Nov 12, 2025

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

  • 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

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

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

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

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

@shubham-cpp shubham-cpp changed the title fix(vtsls): adding 'typescript-svelte-plugin' in vtsls globalPlugins fix(nvim-vtsls): adding 'typescript-svelte-plugin' in vtsls globalPlugins Nov 12, 2025
@Uzaaft Uzaaft force-pushed the fix-svelte-vtsls-plugin branch from 73b9af7 to a005f56 Compare November 15, 2025 10:57
@Uzaaft
Copy link
Member

Uzaaft commented Nov 15, 2025

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

@Uzaaft Uzaaft changed the title fix(nvim-vtsls): adding 'typescript-svelte-plugin' in vtsls globalPlugins feat(svelte): add 'typescript-svelte-plugin' in vtsls globalPlugins Nov 15, 2025
@Uzaaft Uzaaft merged commit aa20d45 into AstroNvim:main Nov 15, 2025
19 of 20 checks passed
@shubham-cpp shubham-cpp deleted the fix-svelte-vtsls-plugin branch November 16, 2025 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants