Albert Marashi
accff826ca
svelte: Migrate to tree-sitter-grammars/tree-sitter-svelte
( #17529 )
...
> [!NOTE]
> The https://github.com/tree-sitter-grammars/tree-sitter-svelte
repository seems to be more well maintained, with higher quality code,
and as per https://github.com/zed-extensions/svelte/issues/1 it was
suggested that we swap to this repository for Svelte grammars
- Closes https://github.com/zed-industries/zed/issues/17310
- Closes https://github.com/zed-industries/zed/issues/10893
- Closes https://github.com/zed-industries/zed/issues/12833
- Closes https://github.com/zed-extensions/svelte/issues/1
- Closes https://github.com/zed-industries/zed/issues/14943
- Closes https://github.com/zed-extensions/svelte/issues/2
- Added: buffer/file symbol outlines for `.svelte` (`outlines.scm`)
- Improved: Attribute directives & modifiers in `.svelte` files can be
styled independently.
- Fixed: issue where svelte expression inside quotes failed parsing
- Improved: Svelte components in Markup are styled differently from
tags.
- Added: Support for Svelte 5 syntax (`{#snippet children()}`, `{@render
foo()`)
- Change: Svelte now using
[tree-sitter-grammars/tree-sitter-svelte](https://github.com/tree-sitter-grammars/tree-sitter-svelte )
for language highlighting
- Added: Support for typescript syntax in svelte expressions


Release Notes:
- N/A
---
**tree-sitter-grammar things to improve**
- [ ] snippet functions aren't being treated as JS code
- [ ] we should be able to detect @component comments and treat them as
markdown
- [x] `foo:bar` style/class/prop directives
- [x] `--foo="..."` var fields
- [ ] snippet/if blocks's children may need to be indented a little
further
Will implement some of the rest of these in a separate PR
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-17 12:02:25 -04:00
Albert Marashi
0988313805
svelte: Revert Tree-sitter grammar upgrade ( #17404 )
...
Closes : #17310
This PR https://github.com/zed-industries/zed/pull/17364 broke my svelte
code, downgrading to the previous commit SHA
`b08d070e303d2a385d6d0ab3add500f8fa514443` fixes the issue.
Until the following issue is resolved, the commit SHA should not be
updated
- tree-sitter-svelte issue I filed:
https://github.com/Himujjal/tree-sitter-svelte/issues/61
Release Notes:
- N/A
2024-09-05 10:05:38 -04:00
Mathias
bde1c95158
svelte: Update Tree-sitter grammar ( #17323 )
...
Before:

After:

Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-04 10:00:19 -04:00
Sören Meier
d32e9f759c
svelte: Improve syntax highlighting ( #12788 )
...
This PR fixes `<script context="module">` not being highlighted.
It also adds support for scss.
Release Notes:
- N/A
2024-07-10 15:42:50 -04:00
Max Brunsfeld
6ebe599c98
Fix issues with extension API that come up when moving Svelte into an extension ( #9611 )
...
We're doing it. Svelte support is moving into an extension. This PR
fixes some issues that came up along the way.
Notes
* extensions need to be able to retrieve the path the `node` binary
installed by Zed
* previously we were silently swallowing any errors that occurred while
loading a grammar
* npm commands ran by extensions weren't run in the right directory
* Tree-sitter's WASM stdlib didn't support a C function (`strncmp`)
needed by the Svelte parser's external scanner
* the way that LSP installation status was reported was unnecessarily
complex
Release Notes:
- Removed built-in support for the Svelte and Gleam languages, because
full support for those languages is now available via extensions. These
extensions will be suggested for download when you open a `.svelte` or
`.gleam` file.
---------
Co-authored-by: Marshall <marshall@zed.dev>
2024-03-22 17:29:06 -07:00