Repository navigation
Conversation
KieranP
force-pushed
the
more-highlighting
branch
6 times, most recently
from
October 21, 2026 10:31
45fe7af to
fd843e4
Compare
KieranP
force-pushed
the
more-highlighting
branch
3 times, most recently
from
October 21, 2026 11:15
44c0533 to
d42a145
Compare
Svelte's grammar leaves script and style bodies, every {...} expression
and its block heads as opaque text, so one whole-file parse and query
coloured only the markup. The highlighter now finds that code with a
query of its own, since Svelte's injection file is Neovim's and inherits
one no package ships, and parses each piece in its own language, over a
plain span where the host would colour it. A script or style's language
follows its type, lang or language as HTML or Svelte would read them,
and each/await/snippet heads are cut apart by a small scanner, as no
TypeScript parse of them marks where the parts end.
- Read inline style and event handler attributes as CSS and JavaScript,
SVG animation's and WebKit's events included and a repeated one read
as its first, decoding character references and mapping spans back
- Find those attributes by a text scan and a tree lookup, as a query
over every attribute cost a large file 157 ms of its highlighting
- Copy CSS's scanner under ThirdParty, as its package builds without it
- Colour SQL's type.qualifier keywords and HTML's doctype as keywords,
and CSS's property and selector names as attributes, in a table of
per-language capture exceptions
- Restate a few CSS and SCSS patterns in a query read after theirs, as
they were written for the earlier to win: a custom property is a
variable where defined and used, an SCSS mixin's name a function
- Resolve each grammar and parser once per highlight, both diff sides
sharing them, keeping only compiled grammars across highlights
- Let a plain span clear colour without leaving a run, so a removed
diff row keeps its dimmed text inside injected code
- Log under the app's fixed bundle identifier, now in MultishellAppCore
so the highlighter shares it with the platform and Ghostty loggers
- Move integerRange and shifted(by:) into MultishellAppCore, replacing
the copies in the diff view, find results and changed-parts marker
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KieranP
force-pushed
the
more-highlighting
branch
from
October 21, 2026 11:23
d42a145 to
a7d376c
Compare
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.
Svelte's grammar leaves script and style bodies and every {...} expression as opaque text, so one whole-file parse and query coloured only the markup. The highlighter now finds injections with a query of its own, since Svelte's injection file is Neovim's and inherits one no package ships, and parses each in its own language over a plain span. Block heads the grammar leaves whole, such as an each key or an await's then, are cut apart, and inline style and event handler attributes are read as CSS and JavaScript.
What this does
What I ran
make formatmake lintmake testmake buildWhat I could not verify:
Docs
Docs/design/if this changes a decision, or thereason it does not need one.
BUGS.mdif this leaves a gap rather than closing it, tagged[Unconfirmed] if nobody has watched it go either way.