Prior to this commit, there was a single Boolean option,
g:vue_disable_pre_processors, which would only activate either *every*
pre-processor syntax file or none of them at all.
This was a known pain point when it comes to performance. On some
machines, loading all the pre-processor syntax files could slow down Vim
noticeably, hence the need for such an option in the first place.
However, turning all of them off means having to live with no syntax
highlighting at all if one uses a pre-processor language.
This commit introduces another option: g:vue_pre_processors. This is a
List of names of pre-processor syntaxes, e.g. ['pug','scss']. If a user
provides this option, only the named pre-processor syntax files will be
loaded.
This change still allows for g:vue_disable_pre_processors: If
g:vue_disable_pre_processors is truthy, pre-processor syntax files
aren't loaded regardless of the value of g:vue_pre_processors.
* removed preprocessing langs from registration
I'm not sure if this will work
* add back support for pre-processors
adds back support for preprocessors, but keeps vim fast when not in use
* completely removed support for preprocessors
testing to see if completely removing preprocessor language registrations will make syntime reports more performant
* added back conditional support
conditional support should work now
* just testing remove all preprocessor support
* I think this will work
* i found the actual bug
some regex statements are being checked several times
* quick fix for now
I only apply a quick fix until I can get to the root of the problem. For this, in order to turn off the preprocessors which seem to bog down vim, just put `let g:avoid_pre_processors = 1` in the .vimrc (or neovim equivalent).
* forgot endif statement
* testing behavior
* removed line to test behavior
* Update readme.md
* Update readme.md
* Update vue.vim
* Update vue.vim
* Update readme.md
Removes omit_attr argument from s:register_language(), because html,
javascript, and css regions were the only ones that used it, and they
are now handled by syntax/html.vim.
`runtime! syntax/html.vim` also has the advantage that we can hook into
the html syntax, meaning that we can add stuff like highlighting
javascript expressions inside vue directives, and add our own html
attributes.
Also removes the start of line limitation introduced in previous commit
* Remove attrs limitation on style tag
Closes#52
Style tags can actually have any amount of extra tags, so adding the
scoped tags is just too limiting.
* Improve attribute patterns
Fixes#8
Alse see https://github.com/pugjs/jade/issues/2184
You should now replace your jade loaders by the pug loaders
and also the digitaltoad/vim-jade by digitaltoad/vim-pug which is the
new vim syntax plugin for pug (mantained by the same person)
- Set the filetype to "vue" for files with a .vue extension
- Define regions for <template>, <style>, and <script> tags
- Include HTML, CSS, and JavaScript syntax highlighting for the <template>,
<style>, and <script> regions