Commit Graph
25 Commits
Author SHA1 Message Date
Adriaan Zonnenberg c424294e76 set "syntax sync fromstart" by default
Instead of setting it by default, I initially only added this as a tip
to the readme, because it is said to be slower. However, I don't really
notice a performance difference, and when the highlighting isn't working
reliably without it, I think it's better to just include it by default.
2019-08-03 21:01:05 +02:00
Adriaan Zonnenberg fcdc2d25d1 use 'detect_on_enter' instead of 'auto' and document the option
With #128, I can imagine some people don't want vim-vue to scan for new
languages on each text change event. So instead of only having an 'auto'
option, users will be able to choose between 'detect_on_enter' and
'detect_on_change'.
2019-08-01 22:29:22 +02:00
Adriaan Zonnenberg af6d92c47d feat: allow loading preprocessors only if the file uses them
When g:vue_pre_processors is set to 'auto', register pre-processors
automatically based on the file's contents, when the file is first
opened.

This works towards #128
2019-07-29 22:27:00 +02:00
Adriaan Zonnenberg 00d77ae375 refactor: Make syntax definition more similar to indent definition 2019-07-24 23:39:08 +02:00
Adriaan Zonnenberg 18c4211bd6 Deprecate g:vue_disable_pre_processors
It was superseded by g:vue_pre_processors (#133)

I could add a message if g:vue_disable_pre_processors is set, asking
people to update their config to the new variable, but I'd rather not
interrupt people's workflows.
2019-07-24 21:01:57 +02:00
Adriaan Zonnenberg 6e90d9ed5a Allow newlines after a tag name
Closes #108
2018-05-25 23:32:56 +02:00
Adriaan Zonnenberg a279172752 Fix #68 - change load order of syntax files
I'm not sure what's the root cause of this, but this seems to work.
2018-03-03 19:47:17 +01:00
Adriaan Zonnenberg 5c3a71983c Simplify testing commands using a Makefile 2018-03-02 18:31:23 +01:00
Adriaan Zonnenberg a0cfe6791c readme
* Remove Typescript section. As long as the highlighting "just works", a section in the FAQ shouldn't be needed.
* Fix typo
* Add some more explanation
* Add links to referenced plugins
2018-03-02 16:22:41 +01:00
Adriaan Zonnenberg fffb29a31a Fix #96 - support custom html tag names 2018-02-22 22:21:07 +01:00
Adriaan Zonnenberg 6518e73886 Add section mappings
References #94
2017-12-12 17:50:43 +01:00
Adriaan Zonnenberg f72aac329a Add configuration for ALE and simplify Syntastic configuration
Replaced syntastic configuration by a file that uses Syntastic's
redirect option to redirect to 'javascript/eslint'
2017-03-28 22:34:20 +02:00
Adriaan Zonnenberg a9f7aedabf Add note to FAQ about nerdcommenter, and add tests for it 2017-03-26 23:45:45 +02:00
Adriaan Zonnenberg e0c07d80c6 Add a note about compound filetypes to the FAQ 2017-03-26 23:00:15 +02:00
Adriaan Zonnenberg 32bc65cac2 Revert "Add multiple filetypes as javscript,html and css (#42)"
This reverts commit 078be5a88f.
2017-03-26 22:51:44 +02:00
Adriaan Zonnenberg 4099c91566 Update readme
Move typescript section to FAQ and add an entry about
`:syn sync fromstart`
2017-03-26 22:35:15 +02:00
Adriaan Zonnenberg d4793f5963 Fix indentation for script tags and refactor
Fixes the indentation for script tags. The javascript indentation
interpreted the `<script>` tag as a comparison operator.
2017-03-26 22:35:06 +02:00
Adriaan Zonnenberg 239401d54d Integrate with CircleCI 2017-03-26 21:27:34 +02:00
Adriaan Zonnenberg b5c8e6f330 Highlight the surrounding tags correctly
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
2017-03-26 21:25:20 +02:00
Adriaan Zonnenberg 32d2c0a943 Easier way to define new languages
Add more test cases

Also fixed some style issues

TODO: split tests up in multiple files, e.g. test/test_html_syntax.vader
2017-03-26 21:23:52 +02:00
Adriaan Zonnenberg 82067c7d14 Add initial tests 2017-03-22 23:34:53 +01:00
Adriaan Zonnenberg cdd07e6497 Fix template pattern (#57) 2017-03-15 12:15:24 +01:00
Adriaan Zonnenberg c122cb8c29 Move 'suffixesadd' from after/ftplugin to ftplugin
In #46, the question was where to put this option, and why some other
plugins put it in the 'after' directory. Vim-javascript puts it in the
'after' directory because they want to keep the settings in the ftplugin
shipped with Vim, and only add the 'suffixesadd' option. Since Vim
doesn't ship with a Vue plugin, we can safely put this option in ftplugin.
2017-02-21 22:00:26 +01:00
Adriaan Zonnenberg 0d5a392a11 Use unlet! instead of unlet
A bang after unlet suppresses the error if there is no such variable,
which removes the need for checking if the variable exists.
2017-02-19 22:10:05 +01:00
Adriaan Zonnenberg 1ae53f086e Add indent and ftplugin files 2016-08-21 23:29:05 +02:00