diff --git a/SSH Config.sublime-syntax b/SSH Config.sublime-syntax index d7cb194..5218d68 100644 --- a/SSH Config.sublime-syntax +++ b/SSH Config.sublime-syntax @@ -236,6 +236,21 @@ contexts: - include: tokens - match: '\d+' scope: constant.numeric.ssh_config + - match: \" + scope: punctuation.definition.string.begin.ssh_config + push: + - meta_scope: string.quoted.double.ssh_config + - match: \" + scope: punctuation.definition.string.end.ssh_config + pop: true + - match: \n|$ + scope: invalid.illegal.ssh_config + pop: true + - include: tokens + - match: \*|\? + scope: constant.language.wildcard.ssh_config + - match: ',' + scope: punctuation.separator.sequence.ssh_config - match: '\S' scope: string.unquoted.ssh_config push: diff --git a/Tests/syntax_test.ssh_config b/Tests/syntax_test.ssh_config index 1f9af40..4516680 100644 --- a/Tests/syntax_test.ssh_config +++ b/Tests/syntax_test.ssh_config @@ -61,6 +61,11 @@ Host * # ^^ keyword.declaration.host-alias # ^ constant.language.wildcard IdentityFile ~/.ssh/id_rsa + Ciphers "aes128-ctr,aes192-ctr,aes256-ctr" + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double + # ^ punctuation.definition.string.begin + # ^ punctuation.separator.sequence + # ^ punctuation.definition.string.end UseKeychain yes # ^^^^^^^^^ keyword.other # ^^^ constant.language.boolean diff --git a/messages/2.2.0.md b/messages/2.2.0.md new file mode 100644 index 0000000..c496e06 --- /dev/null +++ b/messages/2.2.0.md @@ -0,0 +1,18 @@ +v2.2.0 (2019-03-29) +=================== + +If you were missing autocomplete as you type, add a syntax-specific setting with this content (or add this key): + +``` json +{ + "auto_complete_selector": "text.ssh_config, text.sshd_config" +} +``` + +## SSH Config + +- Meta scopes for blocks (`Host` and `Match`), conditionals, and options +- Support for `=` in option assignment +- Mild support for double-quoted option values +- Boolean-only options now complain about non-boolean values +- Highlight wildcards and commas in generic values diff --git a/messaging.json b/messaging.json index b181b26..45a2173 100644 --- a/messaging.json +++ b/messaging.json @@ -1,4 +1,5 @@ { - "2.0.0": "messages/2.0.0.md", - "2.1.0": "messages/2.1.0.md" + "2.2.0": "messages/2.2.0.md", + "2.1.0": "messages/2.1.0.md", + "2.0.0": "messages/2.0.0.md" }