Sublime Forum

Custom Syntax Highlighting - Stuck on Generation

#1

I have been trying to create syntax highlighting got my programming language Floral. Here is the yaml file I created:

%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: Floral
file_extensions:
  - floral
  - fh
scope: source.floral

contexts:
  main:
    - match: \b(global|var|let|struct|enum|behavior|if|else|for|while|func|try|catch|return)
      scope: keyword.control.c
    - match: '"'
      push: string

  string:
    - meta_scope: string.quoted.double.c
    - match: \\.
      scope: constant.character.escape.c
    - match: '"'
      pop: true

However, even after quitting Sublime Text, I failed to see the syntax in View > Syntax. I opened console and saw that it simply said this:

generating syntax summary

It’s been stuck on this for 30 minutes now…

0 Likes

#2

Restarted my computer and for some reason that made it work.

0 Likes

#3

It’s not immediately obvious, but there’s not another message to tell you that it’s done; that message is essentially telling you that it’s already happened. The time taken to compile the syntax and cache it is negligible.

0 Likes

#4

I’ve been thinking of doing some syntax work. There’s this for the Jack programming language (which is very simple, commands such as ctrl+r don’t work) but because it’s simple it might give you a structure to hang your work on.

Disclaimer, I didn’t write it at all, it’s nothing to do with me, no credit is due, except I’ve used it, it’s simple, I thought it Might be useful for your cause !

Good luck

https://packagecontrol.io/packages/Jack

0 Likes