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

Use detailed scope for boolean value #17

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions INI.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ contexts:
- include: string

constant:
- match: \b(?i:true|false)\b
scope: constant.language.ini
- match: \b(?i:true)\b
scope: constant.language.boolean.true.ini
- match: \b(?i:false)\b
scope: constant.language.boolean.false.ini
- match: \bdword\b
scope: storage.type.dword.ini
set:
Expand Down
10 changes: 5 additions & 5 deletions syntax_test_ini.ini
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ basepython =
py34: python3.4

key=true
; ^^^^ meta.mapping.value.ini constant.language.ini
; ^^^^ meta.mapping.value.ini constant.language.boolean.true.ini

key=True
; ^^^^ meta.mapping.value.ini constant.language.ini
; ^^^^ meta.mapping.value.ini constant.language.boolean.true.ini

key=TRUE
; ^^^^ meta.mapping.value.ini constant.language.ini
key=FALSE
; ^^^^^ meta.mapping.value.ini constant.language.boolean.false.ini

key=1234
; ^^^^ meta.mapping.value.ini meta.number.integer.decimal.ini constant.numeric.value.ini
Expand Down Expand Up @@ -172,7 +172,7 @@ key=string 1234 false
; ^^^^^^^^^^^^^^^^^ meta.mapping.value.ini
; ^^^^^^ string.unquoted.ini
; ^^^^ meta.number.integer.decimal.ini constant.numeric.value.ini
; ^^^^^ constant.language.ini
; ^^^^^ constant.language.boolean.false.ini

key1,key2,key3=value
;^^^^^^^^^^^^^ meta.mapping.key.ini
Expand Down
Loading