118 Commits

Author SHA1 Message Date
Alex Hirzel
6ae8fa751f Add reference to official vuejs language tools (#163)
* Add reference to vim-vue-plugin

* Change wording and add more alternatives

* Update readme.md

---------

Co-authored-by: Adriaan Zonnenberg <git@adriaan.dev>
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
2024-03-30 12:53:18 +01:00
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
3105d62346 docs: fix grammar mistake 2019-07-30 12:59:28 +02:00
Adriaan Zonnenberg
da6395c56b docs: fix heading style 2019-07-29 22:47:22 +02:00
Marcel Bischoff
d4e989233e docs: Add tcomment (#134)
* Add tcomment

* reword
2019-07-29 22:46:16 +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
158390bf7a Add a list of available pre-processors 2019-07-24 21:15:32 +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
6acff7e6db Merge pull request #133 from igemnace/feature/configurable-preprocessor
Allow granular control over loading pre-processor syntax files
2019-07-24 20:42:32 +02:00
Adriaan Zonnenberg
c7b133a66e Remove tip about filetype=vue.html.javascript.css
close #131 

Setting this option seems to do more harm than good. To avoid confusion, it's better to remove it altogether.

Currently, the recommended approach to use existing plugins for HTML, CSS or JavaScript, is to explicitly configure that plugin to support Vue files.
2019-03-22 12:02:24 +01:00
Ian Emnace
033df1b169 Enforce order of pre-processor syntax files
The plugin's current behavior is reliant on the order of loading
pre-processor syntax files. In particular, Vader tests are failing for
SCSS snippets; SASS syntax identifiers are applied instead.

Unfortunately, no ordering information can be embedded in a Dictionary,
so s:language_config must be turned into a List.

In the unconfigured case (no g:vue_disable_pre_processors, no
g:vue_pre_processors), pre_processors can be initialized to a
well-ordered List of languages (ordered as they appear in
s:language_config), instead of the unstable keys() on a dict.

Random access of language config is faster from a dict, though, so a
dict is rebuilt in s:language_dict. Going through the s:language_config
List for every pre-processor in pre_processors is O(m * n), as opposed
to building s:language_dict once then looping through pre-processors
once for O(m + n) (since dict access is constant time).
2019-03-19 14:50:15 +08:00
Ian Emnace
6f476f3b90 Update readme for g:vue_pre_processors
The change in commit ba9a3dbc4e is
documented in the README, to augment the information regarding
pre-processor languages and g:vue_disable_pre_processors.
2019-03-19 13:52:19 +08:00
Ian Emnace
ba9a3dbc4e Allow for configurable g:vue_pre_processors
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.
2019-03-19 13:44:46 +08:00
w0rp
e306929b27 Don't set options for ALE (#124)
Setting options for ALE in this file can sometimes overwrite settings that users set, say if they set global settings for ALE after ftplugin files are loaded. The Vue files should not be checked with ESLint by default, and ESLint checking should be enabled manually after installing the Vue ESLint plugin.
2018-11-11 14:38:36 +01:00
Edward Betts
720ca48e02 Correct a spelling mistake (#121) 2018-10-08 13:14:34 +02:00
w0rp
2df4652431 Default to the vimrc linter setting if availble (#118)
* Default to the vimrc linter setting if availble

* Use the default value for aliases too
2018-09-01 19:14:25 +02:00
Eduardo San Martin Morote
23043a7ebf docs(ci): document how to build images 2018-08-08 12:36:19 +02:00
Eduardo San Martin Morote
4df07c7348 ci: remove git repositories cache 2018-08-08 12:23:31 +02:00
Eduardo San Martin Morote
79e57874f7 ci: fix typo 2018-08-08 12:22:27 +02:00
Eduardo San Martin Morote
581c1a09ac ci: add git 2018-08-08 12:21:40 +02:00
Eduardo San Martin Morote
d2d5a30736 ci: simpler image 2018-08-08 12:19:13 +02:00
Eduardo San Martin Morote
2c59f521fb ci: ups 2018-08-08 12:06:39 +02:00
Eduardo San Martin Morote
5cd49ff5a0 ci: custom image 2018-08-08 12:06:05 +02:00
Eduardo San Martin Morote
027a63c26f ci: testing 2018-08-08 11:48:35 +02:00
Eduardo San Martin Morote
c4ba4df60b ci: remove sudo 2018-08-08 11:41:20 +02:00
Eduardo San Martin Morote
3c9e78f75c ci: install make 2018-08-08 11:40:47 +02:00
Eduardo San Martin Morote
d2e8ec0c80 ci: test circle ci 2 2018-08-08 11:37:51 +02:00
w0rp
e531e1d24f Use buffer variables for ALE, and load Vue linters (#111) 2018-07-06 11:26:29 +02:00
Adriaan Zonnenberg
6e90d9ed5a Allow newlines after a tag name
Closes #108
2018-05-25 23:32:56 +02:00
Vincent Petry
58d8de76b0 Explicitly load javascript/eslint.vim (#105)
In some environments it seems it doesn't load automatically.

Fixes #103
2018-04-04 16:17:24 +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
3cc4ac7b02 readme: fix details arrow placement 2018-03-02 20:59:54 +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
Marcel Bischoff
a936d8ab38 Add caw.vim section (#93) 2018-02-24 07:56:54 +01:00
glore Zeng
ea8bd7bd00 Add support for wpy files (#86) 2018-02-23 17:02:28 +01:00
Adriaan Zonnenberg
fffb29a31a Fix #96 - support custom html tag names 2018-02-22 22:21:07 +01:00
Adriaan Zonnenberg
1a2295e12e Add link to eslint-plugin-vue documentation
closes #83
2018-02-22 14:31:59 +01:00
Juan
2cd7b64b1e Fix typo on README (#100) 2018-02-21 17:12:15 +01:00
Adriaan Zonnenberg
6518e73886 Add section mappings
References #94
2017-12-12 17:50:43 +01:00
Michael Foss
db295dbf13 Correct typo in README (#90) 2017-10-19 19:37:09 +02:00
Jacob Merizian
568f5a2762 Allows users to turn off preprocessor language parsing for better performance (#79)
* 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
2017-07-21 11:07:04 +02:00
Adriaan Zonnenberg
c7f975ddb8 Use a script-local variable instead of global 2017-05-17 17:30:07 +02:00
z1lk
aaf2a641b2 Adds a single line to register haml as a template language (#67) 2017-04-28 01:47:30 +02:00
akh
27dc461cb4 v- @ : directives support (#66) 2017-04-17 23:01:57 +02:00
Milot Mirdita
fddbefe37a Fixed instructions for vim8, now loads the plugin (#63) 2017-04-07 21:09:49 +02: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