Skip to content

Explore options to speed up Emmet abbreviation expansion in larger files #43470

Closed

Description

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

Activity

  1. added
    debt
    emmet
    on Feb 12, 2018
  2. ramya-rao-a commented on Mar 27, 2018

    @ramya-rao-a
    ContributorAuthor

    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.

  3. ramya-rao-a commented on Mar 30, 2018

    @ramya-rao-a
    ContributorAuthor

    Tests are done with #46977

  4. 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
  5. locked and limited conversation to collaborators on May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debtemmet

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions