Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial Svelte language support to Codebook’s tree-sitter–based spell-checking pipeline, including query definitions, dictionary wiring, and integration tests.
Changes:
- Introduce
LanguageType::Svelteand register it inLANGUAGE_SETTINGSwith thetree-sitter-svelte-nggrammar. - Add a Svelte tree-sitter query (
svelte.scm) to extract spell-checkable regions (HTML text/attributes, plus<script>/<style>raw text). - Add a Svelte dictionary source and integration tests covering HTML, script, and style sections.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents Svelte as partially supported. |
| crates/codebook/tests/test_svelte.rs | Adds integration tests validating Svelte spell-check extraction. |
| crates/codebook/src/queries/svelte.scm | Defines the tree-sitter query for Svelte spell-checkable nodes. |
| crates/codebook/src/queries.rs | Adds Svelte language type, language settings entry, and grammar mapping. |
| crates/codebook/src/dictionaries/repo.rs | Registers the svelte text dictionary repository source. |
| crates/codebook/Cargo.toml | Adds the tree-sitter-svelte-ng dependency for the codebook crate. |
| Cargo.toml | Pins tree-sitter-svelte-ng in workspace dependencies. |
| Cargo.lock | Locks the newly added dependency. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLOSES #114
The tree-sitter query is from: https://github.com/tree-sitter-grammars/tree-sitter-svelte/tree/master/queries
note, that I'm not familiar with the tree-sitter grammar so the
svelte.scmis vibe-coded... Seems to work though.