-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Set filetype html for Vue.js files. #4619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Identify Vue.js Single File Component source files by their .vue filename extension and set the filetype to html. They're a mixture of html templates, css, and javascript. The html syntax highlighting works well enough.
Codecov Report
@@ Coverage Diff @@
## master #4619 +/- ##
==========================================
+ Coverage 81.33% 81.34% +0.01%
==========================================
Files 111 111
Lines 144836 144963 +127
==========================================
+ Hits 117799 117925 +126
- Misses 27037 27038 +1
Continue to review full report at Codecov.
|
|
Identify Vue.js Single File Component source files by their .vue
filename extension and set the filetype to html. They're a mixture
of html templates, css, and javascript. The html syntax highlighting
works well enough.
That's not the right way. What should happen is to detect *.vue files
as "vue" filetype, then add plugin files for vue that load the related
html plugin. That way a user can override the plugin with something
more specific, if he wants to.
…--
GUARD #2: It could be carried by an African swallow!
GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
that's my point.
GUARD #2: Oh, yeah, I agree with that...
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Instead of treating .vue files as html directly, define a `vuejs` filetype and syntax file which wraps the html syntax file. This makes it possible to override the default highlighting.
|
Thanks for the quick review, @brammool. I've attempted to address your comments. Please let me know how I did. :) |
|
Ralph Giles wrote:
Thanks for the quick review, @brammool. I've attempted to address your
comments. Please let me know how I did. :)
Looks good, thanks. I'll include it.
…--
ARTHUR: You fight with the strength of many men, Sir knight.
I am Arthur, King of the Britons. [pause]
I seek the finest and the bravest knights in the land to join me
in my Court of Camelot. [pause]
You have proved yourself worthy; will you join me? [pause]
You make me sad. So be it. Come, Patsy.
BLACK KNIGHT: None shall pass.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
Lovely, thanks! |
|
Can we rename |
|
I don't have an opinion. I thought |
|
I don't have an opinion. I thought `vuejs` was less likely to conflict
with other projects.
Also: the website is vuejs.org
…--
Two cows are standing together in a field. One asks the other:
"So what do you think about this Mad Cow Disease?"
The other replies: "That doesn't concern me. I'm a helicopter."
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Maybe because of
|
|
I would be in favour of changing it to
It would be less of a hassle if existing plugins didn't have to change to Over at vim-vue this issue arose: posva/vim-vue#138. If we decide to change vim-vue to use |
|
OK, let's call it "vue" then. |
Identify Vue.js Single File Component source files by their .vue
filename extension and set the filetype to html. They're a mixture
of html templates, css, and javascript. The html syntax highlighting
works well enough.