Skip to content

Commit 601301a

Browse files
committed
Settings: Fix namespace highlighting
Resolves #406 This commit expects a setting namespace to be followed by a valid setting name, but not only numbers.
1 parent db7bf1a commit 601301a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ contexts:
4040
scope: meta.mapping.key.json string.quoted.double.json punctuation.definition.string.end.json
4141
set: [expect-any-settings-value, expect-colon]
4242
- include: inside-string
43-
- match: '[\w]+(\.)'
43+
- match: '[\w]+(\.)(?![\d.]+\")'
4444
scope: keyword.other.namespace.sublime-settings
4545
captures:
4646
1: punctuation.separator.namespace.sublime-settings

Package/Sublime Text Settings/syntax_test_settings.json

+22
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,28 @@ s
3636
// ^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.json
3737
// ^ - entity.name.other.key
3838

39+
"disable_plugin_host-3.3": true,
40+
// ^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.key.json string.quoted.double.json
41+
// ^ punctuation.definition.string.begin.json
42+
// ^^^^^^^^^^^^^^^^^^^^^^^ entity.name.other.key.sublime-settings - keyword.other.namespace - punctuation.separator.namespace
43+
// ^ punctuation.definition.string.end.json
44+
45+
"disable_plugin-1.2.3": true,
46+
// ^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.key.json string.quoted.double.json
47+
// ^ punctuation.definition.string.begin.json
48+
// ^^^^^^^^^^^^^^^^^^^^ entity.name.other.key.sublime-settings - keyword.other.namespace - punctuation.separator.namespace
49+
// ^ punctuation.definition.string.end.json
50+
51+
"package.3.4.5a": true,
52+
// ^^^^^^^^^^^^^^^^ meta.mapping.key.json string.quoted.double.json
53+
// ^ punctuation.definition.string.begin.json
54+
// ^^^^^^^^^^^^^^ entity.name.other.key.sublime-settings
55+
// ^^^^^^^^^^^^ keyword.other.namespace.sublime-settings
56+
// ^ punctuation.separator.namespace.sublime-settings
57+
// ^ punctuation.separator.namespace.sublime-settings
58+
// ^ punctuation.separator.namespace.sublime-settings
59+
// ^ punctuation.definition.string.end.json
60+
3961
"package_name.setting": null
4062
// ^^^^^^^^^^^^^^^^^^^^ entity.name.other.key.sublime-settings
4163
// ^^^^^^^^^^^^^ keyword.other.namespace.sublime-settings

0 commit comments

Comments
 (0)