Skip to content

Commit

Permalink
All updates required to publish version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie committed Mar 24, 2023
1 parent 9a61b86 commit d9c34ba
Show file tree
Hide file tree
Showing 4 changed files with 439 additions and 46 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

A simple Text Mate Grammar intended to highlight `.pulsar-syntax` files, to help showcase the way in which a certain Pulsar Theme may highlight or otherwise style a grammar.

But assigning the relevant classes to scopes of the Grammar, it makes it very easy to observe what a Theme will do to certain scopes when preforming Syntax Highlighting,
If you'd like to test a theme you are developing, or test a language you are assigning scopes too, feel free to install the `language-pulsar-syntax` Pulsar Package, to be able to highlight any `.pulsar-syntax` files.

Then grab the example syntax files from this repo, and right away you'll be able to test how syntax highlighting looks at different scopes with your current theme!

* [All Textmate Scopes](https://github.com/confused-Techie/language-pulsar-syntax/blob/main/all-textmate.pulsar-syntax)
148 changes: 148 additions & 0 deletions all-textmate.pulsar-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
Language Pulsar Syntax

# ######################################################################
# This file demonstrates, with the help of `language-pulsar-syntax`
# how different syntax scopes will look on different Pulsar themes.
# Each properties name matches that of it's scope, with that scope applied.
# After each property there is a {{ ... }} where you can add text to see exactly
# how your text would look when given that scope.
# This can also be helpful when creating a theme to ensure no scope has been missed.
# All scope values based on the original TextMate Documentation:
# https://macromates.com/manual/en/language_grammars#naming_conventions
# ######################################################################

comment {{ }} # For comments

comment.line {{ }} # Line comments

comment.line.double-slash {{ }} # // comment

comment.line.double-dash {{ }} # -- comment

comment.line.number-sign {{ }} # # comment

comment.line.percentage {{ }} # % comment

comment.block {{ }} # Multi-line comments like /* ... */ or <!-- ... -->

comment.block.documentation {{ }} # Embedded documentation

constant {{ }} # Various forms of constants.

constant.numeric {{ }} # Those which represent numbers, e.g. 42, 1.3f, 0x4AB1U

constant.character {{ }} # Those which represent characters, e.g. &lt;, \e, \031

constant.character.escape {{ }} # Escape sequences like \e would be constant.character.escape

constant.language {{ }} # Constants (generally) provided by the language which
# are “special” like true, false, nil, YES, NO, etc

constant.other {{ }} # Other constants, e.g. colors in CSS

entity {{ }} # An entity refers to a larger part of the document

entity.name {{ }} # We are naming the larger entity

entity.name.function {{ }} # The name of a function

entity.name.type {{ }} # The name of a type declaration or class

entity.name.tag {{ }} # A tag name

entity.name.section {{ }} # The name is the name of a section/heading

entity.other {{ }} # Other entities

entity.other.inherited-class {{ }} # The superclass/baseclass name

entity.other.attribute-name {{ }} # The name of an attribute (mainly in tags)

invalid {{ }} # Stuff which is 'invalid'

invalid.illegal {{ }} # Illegal values

invalid.deprecated {{ }} # For deprecated stuff

keyword {{ }} # Keywords (when these do not fall into toehr groups)

keyword.control {{ }} # Mainly related to flow control like continue, while, return, etc

keyword.operator {{ }} # Operators can either be textual (e.g. or) or be characters

keyword.other {{ }} # Other keywords

markup {{ }} # This is for markup languages and generally applies to larger subsets of the text.

markup.underline {{ }} # Underlined text

markup.underline.link {{ }} # This is for links

markup.bold {{ }} # Bold text

markup.heading {{ }} # A section header. Optionally provide the heading level as
# the next element, for example markup.heading.2

markup.italic {{ }} # Italic Text

markup.list {{ }} # List items

markup.list.numbered {{ }} # Numbered list items

markup.list.unnumbered {{ }} # Unnumbered list items

markup.quote {{ }} # Quoted (sometimes block quoted) text

markup.raw {{ }} # Text which is verbatim

markup.other {{ }} # Other markup constructs

meta {{ }} # The meta scope is generally used to markup larger parts of the document.

storage {{ }} # Things relating to storage

storage.type {{ }} # The type of something, class, function, int, var, etc

storage.modifier {{ }} # A storage modifier like static, final, abstract, etc

string {{ }} # Strings

string.quoted {{ }} # Quoted strings

string.quoted.single {{ }} # Single quoted strings: 'foo'

string.quoted.double {{ }} # Double quoted strings: "foo"

string.quoted.triple {{ }} # Triple quoted strings: """Python"""

string.quoted.other {{ }} # Other types of quoted: $'shell', $s{...}

string.unquoted {{ }} # For things like here-docs and here-strings

string.interpolated {{ }} # Strings which are "evaluated": `date`, $(pwd)

string.regexp {{ }} # Regular expressions: /(\w+)/

string.other {{ }} # Other types of strings (Should rarely be used)

support {{ }} # Things provided by a framework or library should be below support

support.function {{ }} # Functions provided by the framework/library

support.class {{ }} # When the framework/library provides classes

support.type {{ }} # Types provided by the framework/library

support.constant {{ }} # Constants (magic values) provided by the framework/library

support.variable {{ }} # Variables provided by the framework/library

support.other {{ }} # The above shoul dbe exhaustive, but for everything else

variable {{ }} # Variables. Not all languages allow easy identification (and thus markup) of these

variable.parameter {{ }} # When the variable is declared as the parameter

variable.language {{ }} # Reserved language variables, like this, super, self, etc

variable.other {{ }} # Other variables, like $some_varaible
Loading

0 comments on commit d9c34ba

Please sign in to comment.