|
135 | 135 | { "key": "selector", "operator": "equal", "operand": "source.ts" }, |
136 | 136 | { "key": "is_popup_visible"} |
137 | 137 | ] |
138 | | - }, // In case when auto match is enabled, only format if not within {} |
139 | | - { |
140 | | - "keys": [ "}" ], |
141 | | - "command": "typescript_format_on_key", |
142 | | - "args": { "key": "}" }, |
143 | | - "context": [ |
144 | | - { "key": "selector", "operator": "equal", "operand": "source.ts" }, |
145 | | - { "key": "setting.typescript_auto_format", "operator": "equal", "operand": true }, |
146 | | - { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |
147 | | - { "key": "num_selections", "operator": "equal", "operand": 1}, |
148 | | - { "key": "selection_empty", "operator": "equal", "operand": true }, |
149 | | - |
150 | | - { "key": "preceding_text", "operator": "not_regex_contains", "operand": "\\{$" }, |
151 | | - { "key": "following_text", "operator": "not_regex_contains", "operand": "^\\}" } |
152 | | - ] |
153 | | - }, |
154 | | - // In case when auto match is disabled, format the block regardless |
155 | | - { |
156 | | - "keys": [ "}" ], |
157 | | - "command": "typescript_format_on_key", |
158 | | - "args": { "key": "}" }, |
159 | | - "context": [ |
160 | | - { "key": "num_selections", "operator": "equal", "operand": 1}, |
161 | | - { "key": "setting.typescript_auto_format", "operator": "equal", "operand": true }, |
162 | | - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
163 | | - { "key": "selector", "operator": "equal", "operand": "source.ts" }, |
164 | | - { "key": "setting.auto_match_enabled", "operator": "equal", "operand": false } |
165 | | - ] |
166 | | - }, |
167 | | - { |
168 | | - "keys": [ ";" ], |
169 | | - "command": "typescript_format_on_key", |
170 | | - "args": { "key": ";" }, |
171 | | - "context": [ |
172 | | - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
173 | | - { "key": "setting.typescript_auto_format", "operator": "equal", "operand": true }, |
174 | | - { "key": "selector", "operator": "equal", "operand": "source.ts" } |
175 | | - ] |
176 | | - }, |
177 | | - { |
178 | | - "keys": [ "enter" ], |
179 | | - "command": "typescript_format_on_key", |
180 | | - "args": { "key": "\n" }, |
181 | | - "context": [ |
182 | | - { "key": "setting.typescript_auto_indent", "operator": "equal", "operand": true }, |
183 | | - { "key": "auto_complete_visible", "operator": "equal", "operand": false }, |
184 | | - { "key": "selector", "operator": "not_equal", "operand": "meta.scope.between-tag-pair" }, |
185 | | - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
186 | | - { "key": "num_selections", "operator": "equal", "operand": 1}, |
187 | | - { "key": "selector", "operator": "equal", "operand": "source.ts" } |
188 | | - ] |
189 | 138 | }, |
190 | 139 | { |
191 | 140 | "keys": [ "enter" ], |
|
0 commit comments