Home Download Buy Blog Forum Support

Scope "include" does not seem to work

Scope "include" does not seem to work

Postby yrammos on Mon Mar 11, 2013 2:03 pm

I am trying to create an extension of the LaTeX syntax, which I will call here LyTeX.

At this initial point, all I want is to "inherit" the standard LaTeX syntax patterns and have .lytex files highlighted just like .latex files. To this end I created the following LyTeX.JSON-tmlanguage file:

Code: Select all
{ "name": "LyTeX",
  "fileTypes": ["lytex"],
  "scopeName": "text.lytex",
  "patterns": [
     {"include": "text.tex.latex"}
  "uuid": "36eee982-a340-44fd-9b79-4d30f30a0fe0"

I have built the corresponding .tmlanguage file, which has been loaded correctly. Files with the .lytex extension are indeed associated with the LyTeX syntax as expected.

The problem however is that I get no syntax highlighting whatsoever. Scope Hunter in fact indicates that my .lytex files are never endowed with the text.lytex scope, instead appearing as "text.plain" scopes, which probably explains the lack of highlighting.

How can I get this to work? Why, in other words, is the "text.lytex" scope never assigned?

Thank you.
Posts: 29
Joined: Fri Jun 22, 2012 3:26 am

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 4 guests