File tree Expand file tree Collapse file tree 2 files changed +74
-6
lines changed
packages/cursorless-engine/src/languages Expand file tree Collapse file tree 2 files changed +74
-6
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ const SECTIONING = [
7979] ;
8080
8181const sectioningText = SECTIONING . map ( ( s ) => `${ s } [text]` ) ;
82- const sectioningCommand = SECTIONING . map ( ( s ) => `${ s } [command]` ) ;
8382
8483function unwrapGroupParens (
8584 editor : TextEditor ,
@@ -134,11 +133,6 @@ const nodeMatchers: Partial<
134133 unwrapGroupParens ,
135134 ) ,
136135 ) ,
137-
138- functionCall : cascadingMatcher (
139- matcher ( patternFinder ( ...COMMANDS , "begin" , "end" ) ) ,
140- matcher ( patternFinder ( ...sectioningCommand ) , extendToNamedSiblingIfExists ) ,
141- ) ,
142136} ;
143137
144138export default createPatternMatchers ( nodeMatchers ) ;
Original file line number Diff line number Diff line change 8686 text: (_) @name
8787 )
8888) @_.domain
89+
90+ [
91+ (displayed_equation)
92+ (generic_command)
93+ (inline_formula)
94+ (block_comment)
95+ (package_include)
96+ (class_include)
97+ (latex_include)
98+ (biblatex_include)
99+ (bibtex_include)
100+ (graphics_include)
101+ (svg_include)
102+ (inkscape_include)
103+ (verbatim_include)
104+ (import_include)
105+ (caption)
106+ (citation)
107+ (label_definition)
108+ (label_reference)
109+ (label_reference_range)
110+ (label_number)
111+ (new_command_definition)
112+ (old_command_definition)
113+ (let_command_definition)
114+ (environment_definition)
115+ (glossary_entry_definition)
116+ (glossary_entry_reference)
117+ (acronym_definition)
118+ (acronym_reference)
119+ (theorem_definition)
120+ (color_definition)
121+ (color_set_definition)
122+ (color_reference)
123+ (tikz_library_import)
124+ (begin)
125+ (end)
126+ ] @functionCall
127+
128+ (subparagraph
129+ command: _ @functionCall.start
130+ .
131+ (_)? @functionCall.end
132+ )
133+ (paragraph
134+ command: _ @functionCall.start
135+ .
136+ (_)? @functionCall.end
137+ )
138+ (subsubsection
139+ command: _ @functionCall.start
140+ .
141+ (_)? @functionCall.end
142+ )
143+ (subsection
144+ command: _ @functionCall.start
145+ .
146+ (_)? @functionCall.end
147+ )
148+ (section
149+ command: _ @functionCall.start
150+ .
151+ (_)? @functionCall.end
152+ )
153+ (chapter
154+ command: _ @functionCall.start
155+ .
156+ (_)? @functionCall.end
157+ )
158+ (part
159+ command: _ @functionCall.start
160+ .
161+ (_)? @functionCall.end
162+ )
You can’t perform that action at this time.
0 commit comments