Skip to content

Conversation

eugenesvk
Copy link

%YAML 1.2
---
name             : AutoHotkey2                    # extends the AutoHotkey package with v2-specific contexts
file_extensions  : [ahk]
first_line_match : '^#Requires AutoHotKey v2[\d\.\-a-z]*'
scope            : source.ahk
version          : 2
extends          : Packages/AutoHotkey/AutoHotkey.sublime-syntax

contexts:
  main             :
    - meta_append  : true
    - include      : string-quoted-single

  string-quoted-single:
    - match: (')
      captures:
        1: punctuation.definition.string.ahk
      push:
        - meta_scope: string.quoted.single.ahk
        - match: (')(?!')|^
          captures:
            1: punctuation.definition.string.ahk
          pop: true

Allows easy user fixes by extending the default syntax without editing the packaged file
Also enables easier v2 syntax upgrade, though at the moment both syntaxes can't exist since they are applied to the same extension

Issue: ahkscript#66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comment line doesn't include EOL
1 participant