You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Explore options to speed up Emmet abbreviation expansion in larger files #43470
Currently we use the emmet modules html-matcher and css-parser to parse html,css,less,scss files to determine whether or not current position is a valid location to expand emmet abbreviation. Cons of this approach are
The parsers are slow when it comes to large files
The parsers are not tolerant for incomplete files.
The parsers used in the html and css extensions on the other hand are faster and more accurate
In common cases, like having html emmet completions in ts/js files, use of html parser will not help. So we will continue to use the parsing logic we have at the moment where we traverse backwards (atmost 500 characters) from current position to decide if we are inside an open or close tag.
For stylesheets, we are resolving to do a partial parsing of the content around the cursor to determine if emmet completions would be valid or not. See 91416ff and f5b569b
changed the title [-]Replace emmet parser with the one from html/css language service when expanding abbreviation[/-][+]Explore options to speed up Emmet abbreviation expansion in larger files[/+]on Apr 2, 2018
Activity
ramya-rao-a commentedon Mar 27, 2018
In common cases, like having html emmet completions in ts/js files, use of html parser will not help. So we will continue to use the parsing logic we have at the moment where we traverse backwards (atmost 500 characters) from current position to decide if we are inside an open or close tag.
Due to the css language service having issues with parsing incomplete files (See microsoft/vscode-css-languageservice#81 and microsoft/vscode-css-languageservice#69), we wont be using the parsers from the css language service.
For stylesheets, we are resolving to do a partial parsing of the content around the cursor to determine if emmet completions would be valid or not. See 91416ff and f5b569b
What's pending is tests for the same.
Use partial parsing for stylesheets for Emmet command #43470
Avoid parsing file when abbr is invalid #43470
ramya-rao-a commentedon Mar 30, 2018
Tests are done with #46977
[-]Replace emmet parser with the one from html/css language service when expanding abbreviation[/-][+]Explore options to speed up Emmet abbreviation expansion in larger files[/+]