-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore options to speed up Emmet abbreviation expansion in larger files #43470
Comments
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. |
Tests are done with #46977 |
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 used in the html and css extensions on the other hand are faster and more accurate
The text was updated successfully, but these errors were encountered: