README 未给出安装命令,VSCode 用户需从 Marketplace 安装 svelte.svelte-vscode 扩展;其他 IDE 需自行接入 LSP 客户端
language-tools
sveltejsMIT活跃维护Svelte 官方语言服务器及配套编辑器扩展,为 Svelte 组件提供代码补全、类型检查和诊断等智能提示能力。
The Svelte Language Server, and official extensions which use it
README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。
README 未说明
Svelte 官方语言服务器与编辑器扩展,为 .svelte 文件提供 LSP 级智能提示
Svelte 官方语言服务器及配套编辑器扩展,为 Svelte 组件提供代码补全、类型检查和诊断等智能提示能力。
核心能力
- 实现 Language Server Protocol 供各类 IDE 接入
- 仓库内托管官方 VSCode 扩展
- 支持 .svelte 文件中的 HTML 与 JavaScript 混合语法
- 可驱动其他 IDE 的 Svelte 插件
容易踩的坑
Patch Changes
- fix: point component declaration maps to the original
.sveltefile instead of a non-existent.svelte.tsfile (#3173)
- fix: point component declaration maps to the original
- [email protected]2026-11-01 · 2026-11-01 18:03 UTC
查看更新说明
Patch Changes
-
Preserve TypeScript files listed in
tsconfig.jsonwhen running with--tsgo. (#3146) -
fix: update --tsgo-experimental-api for typescript 7.1 (#3168)
-
Report a tsconfig parse error instead of an internal error on
--incrementaland--tsgoruns when the tsconfig path is not normalized. (#3169) -
fix: type the exports of
src/hooks.serverwith--tsgo-experimental-api(#3154)
-
- [email protected]2026-11-01 · 2026-11-01 18:03 UTC
查看更新说明
Patch Changes
-
Hide imports and re-export aliases from document symbols to match VS Code's TypeScript outline. (#3113)
-
Show inlay hints inside a
<script>tag that comes after other content in the file. (#3150) -
fix: type the exports of
src/hooks.serverwith--tsgo-experimental-api(#3154) -
Updated dependencies [
fda3f39]:
-
- [email protected]2026-10-16 · 2026-10-16 13:21 UTC
查看更新说明
Patch Changes
-
fix: prevent errors in language service reduced mode (#3110)
-
fix: recognise modern CSS properties such as corner-shape by updating vscode-css-languageservice (#3122)
-
fix: ensure config discovery when the workspace sits under a dot directory. (#3121)
-
fix: resolve symlinked packages when importing their
.sveltefiles, so their types are not duplicated (#3119) -
fix: fallback to prettier-plugin-svelte version 4 for Svelte 5 (#3117)
-
Hide generated snippet functions from document symbols so they do not appear in the editor outline. (#3114)
-
fix: align default tsconfig "include" logic with tsc/tsserver (#3110)
-
Updated dependencies [
7e2f572,1d367d0,092af38,b9f3faa,2394f19]:
-
- [email protected]2026-10-16 · 2026-10-16 13:21 UTC
查看更新说明
Patch Changes
-
perf: skip type-checking in
emitDts(#3130) -
fix: ignore
noEmitOnErrorandisolatedDeclarationsinemitDts(#3129) -
perf: use a module resolution cache in emitDts, avoiding a full module resolution walk for every import of every file in the program (#3093)
-
fix: recognise the real
<script>and<style>start tags when a matching token also appears inside the other tag (#3079) -
fix: don't hide $props type argument error (#3126)
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
What is Svelte Language Tools?
Svelte Language Tools contains a library implementing the Language Server Protocol (LSP). LSP powers the VSCode extension, which is also hosted in this repository. Additionally, LSP is capable of powering plugins for numerous other IDEs.
A .svelte file would look something like this:
<script>
let count = $state(1);
let doubled = $derived(count * 2);
let quadrupled = $derived(doubled * 2);
function handleClick() {
count += 1;
}
</script>
<button onclick="{handleClick}">Count: {count}</button>
<p>{count} * 2 = {doubled}</p>
<p>{doubled} * 2 = {quadrupled}</p>
Which is a mix of HTMLx and vanilla JavaScript (but with additional runtime behavior coming from the svelte compiler).
This repo contains the tools which provide editor integrations for Svelte files like this.
Contributing
Contributions are encouraged and always welcome. Read the contribution guide for more info and help us out!
Supporting Svelte
Svelte is an MIT-licensed open source project with its ongoing development made possible entirely by the support of awesome volunteers. If you'd like to support their efforts, please consider:
Funds donated via Open Collective will be used for compensating expenses related to Svelte's development such as hosting costs. If sufficient donations are received, funds may also be used to support Svelte's development more directly.
License
Credits
- James Birtles for creating the foundation which this language server, and the extensions are built on
- Vue's Vetur language server which heavily inspires this project
- halfnelson for creating
svelte2tsx - jasonlyu123 for his ongoing work in all areas of the language-tools