Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to the better user(!)-extensible sublime-syntax format #72

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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