-
-
Notifications
You must be signed in to change notification settings - Fork 84
Syntax Tests
The syntax specified in the first line of a syntax test file is assigned automatically and overrides any automatic detection from Sublime Text's side.
If the specified path does not exist in your installation, the Plain Text syntax is used.
The columns of the line tested with the currently active line are highlighted. The highlighting style can be configured in the settings.
PackageDev tries to determine a scope selector to test against the specified columns. This only happens when pressing ^ on a line that does not have a syntax test already. (Also works for <-.) You can extend the matched region by pressing ^ again. The selector will be reduced to the greatest common denominator of the scopes on the selected columns.
You can press the Tab key on an empty test line to jump to the next untested column and automatically insert a scope selector.
With syntax_test.suggest_asserted_prefix
enabled,
the above show case would not include meta.sequence.json
completions
for any line following the first.
Selecting PackageDev: Generate Syntax Tests for Line from the command palette or using Ctrl+Enter will generate syntax tests for all tokens and scope regions on the current line.
Syntax test linting is not provided by this package, but you can use the SublimeLinter-contrib-sublime-syntax package, which uses the SublimeLinter framework and interfaces with ST's internal API.