Skip to content

Load languages lazily #128

Open
Open
@adriaanzon

Description

@adriaanzon

Opening and editing Vue files can be slow (#95) since vim-vue loads every supported language that is installed. This is holding us back from adding new languages (#97 (comment), #127, #67 (comment)) because that would make it even slower.

We need a way to load only the syntax scripts for the current file. I already started some work this on the performance-enhancement branch: 265f991. This, however, will only load the languages when opening a file, so when you add or change the outer tags you must reload the file using :e. This can become irritating, so it would be nice to load syntax scripts automatically when they're needed.

I like the approach of vader.vim. For every change, it checks to see if a new language has been embedded on the current line, and loads the corresponding syntax script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions