@rsvelte/language-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yuichiro Yamashita
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @rsvelte/language-server
2
+
3
+ A Language Server for [rsvelte](https://github.com/baseballyama/rsvelte) — the
4
+ Rust port of the Svelte compiler. It exposes rsvelte's **formatter** and
5
+ **linter** over the Language Server Protocol, so any LSP client (VS Code,
6
+ Neovim, …) can format and lint Svelte (and JS/TS/CSS/JSON) without a separate
7
+ toolchain.
8
+
9
+ ## Features (v1)
10
+
11
+ - **Formatting** — `textDocument/formatting` shells out to the native
12
+ `rsvelte-fmt` CLI (`--stdin --stdin-filepath <path>`) and returns a
13
+ whole-document edit. `rsvelte-fmt` formats `.svelte` in-process and delegates
14
+ embedded JS/TS/CSS to oxfmt, so the result is a complete format. The binary is
15
+ resolved from `node_modules/.bin/rsvelte-fmt` (install
16
+ [`@rsvelte/fmt`](https://www.npmjs.com/package/@rsvelte/fmt)); if it can't be
17
+ found, formatting is silently disabled.
18
+ - **Diagnostics** — push diagnostics from the bundled
19
+ [`rsvelte_lint`](https://github.com/baseballyama/rsvelte/tree/main/crates/rsvelte_lint)
20
+ engine (compiled to wasm, vendored in the package — no extra install). Runs on
21
+ open, on change (300 ms debounced), and on save.
22
+
23
+ Type-checking is intentionally out of scope for v1 (use
24
+ [`@rsvelte/svelte-check`](https://www.npmjs.com/package/@rsvelte/svelte-check)
25
+ as a batch checker).
26
+
27
+ ## Settings
28
+
29
+ The server reads these from the client's `rsvelte.*` configuration:
30
+
31
+ | Key | Default | Description |
32
+ | --- | --- | --- |
33
+ | `rsvelte.format.enable` | `true` | Enable formatting via `rsvelte-fmt`. |
34
+ | `rsvelte.lint.enable` | `true` | Enable linting via the bundled engine. |
35
+ | `rsvelte.rsvelteFmtPath` | `""` | Explicit path to a `rsvelte-fmt` binary (overrides resolution). |
36
+
37
+ ## Usage
38
+
39
+ ```sh
40
+ rsvelte-language-server --stdio
41
+ ```
42
+
43
+ Most users won't run this directly — the
44
+ [rsvelte VS Code extension](https://github.com/baseballyama/rsvelte/tree/main/apps/npm/vscode)
45
+ bundles and launches it. For other editors, point your LSP client at the
46
+ `rsvelte-language-server` binary with the `--stdio` transport.
47
+
48
+ ## License
49
+
50
+ MIT