[vim/vim] Add svelte syntax highlighting (PR #21200)

12 views
Skip to first unread message

231tr0n

unread,
Aug 31, 2026, 2:51:59 PM (5 days ago) Aug 31
to vim/vim, Subscribed

This PR adds svelte syntax highlighting to runtime files. I also modified the html syntax file to fix few issues related to html tag attributes and tags like path not being highlighting in svg/math tags.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21200

Commit Summary

  • c056063 feat: add svelte styling
  • 117f898 Merge branch 'vim:master' into master

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200@github.com>

Christian Brabandt

unread,
Sep 2, 2026, 2:12:12 PM (3 days ago) Sep 2
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21200)

thanks, but it seems this breaks the syntax tests, see e.g. here: https://github.com/vim/vim/actions/runs/33663735531/job/100360246502#step:4:20606

And also the svelte syntax seems to be flaky:
command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_svelte_runes_in_script line 15: svelte $state rune: Expected 'svelteRune' but got 'svelteMustache'

command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_svelte_runes_in_script line 15: svelte $state rune: Expected 'svelteRune' but got 'svelteMustache'


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5514189118@github.com>

231tr0n

unread,
Sep 2, 2026, 2:42:53 PM (3 days ago) Sep 2
to vim/vim, Subscribed
231tr0n left a comment (vim/vim#21200)

thanks, but it seems this breaks the syntax tests, see e.g. here: https://github.com/vim/vim/actions/runs/33663735531/job/100360246502#step:4:20606

And also the svelte syntax seems to be flaky: command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_svelte_runes_in_script line 15: svelte $state rune: Expected 'svelteRune' but got 'svelteMustache'

command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_svelte_runes_in_script line 15: svelte $state rune: Expected 'svelteRune' but got 'svelteMustache'

sure will take a look at it and try to resolve and notify you once fixed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5514569847@github.com>

Aliaksei Budavei

unread,
Sep 2, 2026, 8:01:36 PM (3 days ago) Sep 2
to vim/vim, Subscribed
zzzyxwvut left a comment (vim/vim#21200)

Having re-read CONTRIBUTING.md, I see that the listed steps
for updating runtime files are too many "tweets" away from
the comforting invitation that says it all: "patches are
welcome in whatever form". A TL;DR summary (with a word or
two about runtime files) near the beginning and a few emojis
sprinkled here and there to cheer up a young reader plodding
through that dull essay may improve it a little.

I'm puzzled what proposed changes to the Java, Python, and
HTML syntax plugins have to do with the Svelte plugin.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5518209665@github.com>

Aliaksei Budavei

unread,
Sep 2, 2026, 8:24:47 PM (3 days ago) Sep 2
to vim/vim, Subscribed
zzzyxwvut left a comment (vim/vim#21200)

For the Java part...

What a matched _ is is fraught with difficulties as its role
evolved from a valid identifier (up to Java 9):

Java8IdentifierTests.java
class Java8IdentifierTests
{
	static class _
	{
		void _(Object _)
		{
			System.out.println(_().apply(_));
		}

		<T> java.util.function.Function<T, T> _()
		{
			return (T _) -> _;
		}
	}

	public static void main(String[] args)
	{
		new _()._(args.length);
	}
}

to an invalid identifier (up to Java 21) to the keyword
designated for unnamed variables and patterns. I don't
have up-to-date market penetration figures for Java versions
used in the wild in hand but judging by the fact that five
long-time-support releases (8, 11, 17, 21, 25) are currently
maintained and regularly updated, we can safely presume that
there are still users of all three incarnations of _.

The sobering part is that we have no way of discovering what
release a source file will be compiled for. There is no
"project" concept for collections of files when viewed in
Vim, unless by using a third-party plugin. A configuration
file for a project, e.g. Maven's pom.xml, where provided
settings are recorded, such as what version of compiler /
interpreter to use etc., is just another file whose contents
will NOT be parsed and later consulted when other files are
about to be loaded. Thus, with an out-of-the-box Vim, we
resort to communicating our preferences by whatever means of
configuration is available (typically by defining certain
variables) for a particular filetype. If we look closely at
the current and previous versions of the distributed syntax
plugin for Java, its syntax rules have always strived to
align with the latest Java release of the day.

I find it inept to introduce a configuration variable for
how _ ought to be treated since this will be at odds with
whether each _ instance, if any, is an error or not at
compilation. A better alternative, in my opinion, is to
continue not matching _ in the distributed syntax plugin but
at some future point provide and start maintaining in the
upstream repository a revised distributed syntax plugin with
all later versions functionality removed for each released
Java version
; e.g. for the Java 8 syntax plugin there will
be no later syntax rules available in Java 9, 10, 11, etc.
Users can then request a particular plugin version and only
pay for syntax rules whose instances their source files can
have.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5518403621@github.com>

231tr0n

unread,
Sep 3, 2026, 4:01:49 PM (2 days ago) Sep 3
to vim/vim, Subscribed
231tr0n left a comment (vim/vim#21200)

Hey @chrisbra, I fixed the tests now for svelte. Can you please review the PR once and let me know if anymore changes are necessary. The failing CI checks are build errors which are failing during apt-get which most likely is not related to this PR and should be fixed on retrigger.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5531381252@github.com>

dkearns

unread,
Sep 4, 2026, 1:55:02 PM (yesterday) Sep 4
to vim/vim, Subscribed
dkearns left a comment (vim/vim#21200)

Can you please extract anything that's not svelte related to a separate PR?

I haven't had a good look at this PR but I don't think we want fencedframe in the HTML file, that is dead on arrival.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5544440005@github.com>

231tr0n

unread,
Sep 4, 2026, 3:39:27 PM (yesterday) Sep 4
to vim/vim, Subscribed
231tr0n left a comment (vim/vim#21200)

Can you please extract anything that's not svelte related to a separate PR?

I haven't had a good look at this PR but I don't think we want fencedframe in the HTML file, that is dead on arrival.

Sure then will raise seperate PRs for python and remove all html changes then.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5545590656@github.com>

231tr0n

unread,
Sep 4, 2026, 3:43:39 PM (yesterday) Sep 4
to vim/vim, Subscribed
231tr0n left a comment (vim/vim#21200)

@dkearns i removed all unwanted changes from this pr and only made is svelte specific. Please let me know if anything else needs change.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5545634136@github.com>

231tr0n

unread,
4:11 AM (15 hours ago) 4:11 AM
to vim/vim, Subscribed
231tr0n left a comment (vim/vim#21200)

@jvoisin i made the changes which you wanted. Pleases let me know if everything looks alright now.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21200/c5550497563@github.com>

Reply all
Reply to author
Forward
0 new messages