-
Notifications
You must be signed in to change notification settings - Fork 2
Syntax philosophy
The syntax highlighting aims to reach at least the same level of detail as the native fish highlighting in the terminal.
When possible, this level of detail should even be exceeded to take maximal advantage of the the scope types available in Sublime Text (for example, highlighting numbers as constant
and option parameters as variable.parameter
).
The syntax must take the form of a single set of rules that can be applied to any script written for fish 2.7 or later. The syntax is agnostic of the particular version of fish that the user is targeting for a particular script. Essentially, it is a superset of all fish versions from 2.7 and on.
As subsequent versions of fish release new features, these must be non-destructively incorporated into the syntax.
When features are removed from fish, they are not removed from the syntax highlighting.
When features are changed in fish, this creates a conflict and the only reasonable solution is to make the change and prefer whatever format is correct for the latest version of fish.
This is why the behaviour
category is tracked in the compatibility highlighter; to identify when the syntax is showing the behaviour of a later version of fish than the user is targeting.
The contents of this wiki are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.