@@ -19,8 +19,6 @@ export function activateWebview(context: vscode.ExtensionContext) {
1919 commands . registerCommand ( 'ast-grep.clearSearchResults' , clearSearchResults ) ,
2020 commands . registerCommand ( 'ast-grep.expandAll' , toggleAllSearch ) ,
2121 commands . registerCommand ( 'ast-grep.collapseAll' , toggleAllSearch ) ,
22- commands . registerCommand ( 'ast-grep.enableYAML' , enableYAML ) ,
23- commands . registerCommand ( 'ast-grep.enablePattern' , enablePattern ) ,
2422 )
2523}
2624
@@ -124,26 +122,6 @@ function clearSearchResults() {
124122 parentPort . postMessage ( 'clearSearchResults' , { } )
125123}
126124
127- function enableYAML ( ) {
128- parentPort . postMessage ( 'enableYAML' , true )
129- parentPort . postMessage ( 'clearSearchResults' , { } )
130- vscode . commands . executeCommand (
131- 'setContext' ,
132- 'ast-grep.yamlMode' ,
133- true ,
134- )
135- }
136-
137- function enablePattern ( ) {
138- parentPort . postMessage ( 'enableYAML' , false )
139- parentPort . postMessage ( 'clearSearchResults' , { } )
140- vscode . commands . executeCommand (
141- 'setContext' ,
142- 'ast-grep.yamlMode' ,
143- false ,
144- )
145- }
146-
147125let defaultCollapse = false
148126
149127// reset default collapse when starting a new search
0 commit comments