verona Syntax highlighting C++

UPDATE: Search the VS Code marketplace for Verona!


Hey! 👋

I'm not sure if you all have something already you use to syntax highlight your Verona (maybe just using C# or C++?) but I wanted to try my hand at writing something specific to the language, so have put together a rough-and-ready VS Code plugin. It does a reasonable job of highlighting, ~~but currently only highlights within classes, so standalone expressions aren't handled yet.~~

I'd like to spend a little more time on tightening things up and filling in gaps before publishing something to the marketplace, but thought I'd drop a line here first in case you already had thoughts or plans for this, or if anybody else wanting to dig into the language is looking for syntax highlighting.

Asked Oct 08 '21 14:10
avatar KodrAus
KodrAus

6 Answer:

Thanks, that's really nice!

We are planning to support the language server protocol in the compiler, so that we can get syntax highlighting, autocompletion, error reporting, and so on in an IDE, but that's still quiet a way away. Your plugin is a great interim (and is likely to continue to be a lot faster - as I recall, VS Code can use in-process JSON grammars for quick highlighting as you type and replace the colours with a slower LSP implementation when it returns, so it's likely to be useful for a long time).

1
Answered Jun 10 '20 at 08:30
avatar  of davidchisnall
davidchisnall

Another cool thing would be to add it to Pygments. I think it's still the way GitHub does highlight in file view and code review.

1
Answered Jun 10 '20 at 09:41
avatar  of rengolin
rengolin

I would love to see this in Pygments. I have added some Markdown things that use ```verona escapes, but currently GitHub just renders them withotu syntax highlighting.

1
Answered Jun 10 '20 at 10:24
avatar  of davidchisnall
davidchisnall

So it looks like GitHub might be using a project called linguist now? And looking at some of the grammars in there we might actually be able to re-use the same textmates grammar in both VS Code and in GitHub.

I think this is in a reasonable enough state for an initial release now, so I’ll give it a package name that’s unlikely to conflict with one you might want later and push it up!

Also please reach out if at any point in the future you’d like to be added to the repo or rehome it somewhere else.

1
Answered Jun 10 '20 at 13:16
avatar  of KodrAus
KodrAus

I think GitHub is a bit picky about what languages they allow into linguist. In particular they require the language to be actively used by some GitHub projects.

eg. Pony had a bit of trouble getting in, even despite there being projects using it: https://github.com/github/linguist/pull/2600

1
Answered Jun 10 '20 at 13:43
avatar  of plietar
plietar

@plietar I saw their readme had a requirement of "a few hundred repos" using a language before they'll consider adding support.

But in the meantime I've published this as Verona Syntax on the VS Code marketplace, so if you search for Verona in the extension window then it'll come up 🙂

I'm positive there are bugs, missing syntax, and non-ideal highlighting here and there but I think this is a good starting point for folks that want to dive into the project!

1
Answered Jun 10 '20 at 22:25
avatar  of KodrAus
KodrAus