Giter Site home page Giter Site logo

atom-vue's Introduction

Warning!

Maintenance Mode: While this package is no longer maintained by @hedefalk, this package is still receiving maintenance as needed. // @confused-Techie

Vue component support in Atom/Pulsar

Adds syntax highlighting and snippets to Vue component files in Pulsar.

Originally converted from vuejs/vue-syntax-highlight.

Working with SCSS/Sass

Since vue-loader redirects language=x to loader style!css!x and sass-loader is using SCSS as default, you need to remap them in webpack.config.js:

vue: {
  loaders: {
    sass: 'style!css!sass?indentedSyntax',
    scss: 'style!css!sass'
  }
}

This is so that this package can support both old Sass and new SCSS. Refer to hedefalk/atom-vue#5 and the official solution for more info.

atom-vue's People

Contributors

aidistan avatar alexnsolo avatar blake-newman avatar confused-techie avatar davidhewitt avatar hedefalk avatar itsmapleleaf avatar jacobmischka avatar jonboiser avatar laurentpayot avatar lucaperret avatar masquevil avatar mehwww avatar nopnop avatar patmead avatar samherbert avatar snaptopixel avatar stenverbois avatar tbwiii avatar vinicius73 avatar weotch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-vue's Issues

Linter doesn't work

Hi.

Today I noticed eslint stopped working in tabs with opened .vue files. I'm pretty sure it worked before, and it still works for regular .jsfiles. Perhaps it has something to do with 1.4.1 update, although I'm not sure what packages this problem related to.

cssnext nested selector syntax highlighting

Is there a way to augment the syntax highlighting used between <style> tags if we want to use postcss-cssnext? I noticed the language-vue grammar doesn't highlight nested selectors:

main { /* 'main' is red */
    & button.foo { /* button and foo are dark grey, the dot is light grey, should be all be red */
        color: pink;
        & span.bar baz { /* span. is light grey, bar and baz are dark grey */
            background: blue;
        }
    }
}

How to add more snippets into ~/.atom/snippets.cson ?

I already installed language-vue, and try adding more snippet entries into my ~/.atom/snippets.cson.
Unfortunately these snippets aint working.

Do i have to add my own snippets into language-vue's snippets file ?

Please help

Using a number in a shortcut bind breaks highlighting slightly

Example

<template>
 <Component :question1URL="whatever" />
</template>

image

Expected: Entire

:question1URL

part is green.

Actual: everything after and including the number is white.

I tried looking into the code to help fix this but I've never looked at the grammar stuff before sorry...

SugarSS for PostCSS

I'm trying to get language-vue to highlight SugarSS syntax for PostCSS, but to no avail. The syntax is supported by language-postcss.

It's not super bad though, there's a bit of highlighting but color definitions gets a red block:

Syntax

Variable indentation

Not sure if i have missed it but is there a way to let atom switch between tab size in the different parts of the .vue file? For example: I want to use 2 spaces in my JS but four in my SASS.

Working with scopes

I'm trying to apply different indention rules to the HTML and JS portion of my vue files. When I log scope in the <template></template>, I get text.html.vue, while in the <script></script>, the scope is logged as text.html.vue and source.js.embedded.html.

Is it possible to target a combination of scopes in my config, so that I can apply 1 set of indentation rules to text.html.vue and another to text.html.vue + source.js.embedded.html, or something? If not, is there any chance we could add an additional scope that just targets the html/template portion of the file?

Non English Keyboard Issue

When using atom-vue and with a non English keyboard layout I can't insert a colon symbol anymore.
If I change to a English layout I don't have this problem. But since my keyboard is in this case portuguese it is an hassle. Instead of the colon (:) it inserts > > > >.

I can workound it by copy pasting the colon, but would be awesome to have this fixed.

Support for Ctrl-D in <template>

When using Ctrl-D in an ordinary HTML file, you can select the containing scope. You can press Ctrl-D multiple times to expand the scope further. This is quite handy in some cases, but sadly, this doesn't work in atom-vue. I'm not sure why it doesn't work, but can this be added?

Support SASS syntax correctly

There are two syntaxes available for Sass. The new one, known as SCSS (Sassy CSS) and recommanded by Sass, is an extension of the syntax of CSS and more widely used today. And the sass loader for Webpack, sass-loader, only processes .scss files as described in its document.

Thus we have to write styles like this in .vue files

<style lang="sass">
</style>

which should be highlighted in SCSS syntax, not in SASS syntax.

It's a little weird. So I open this issue for discussion instead of sending a PR to correct directly.

Can not install

it will show error
Installing “hedefalk/atom-vue” failed
Cannot read property 'getReferenceTarget' of null

Wrong highlighting in block comments

Hi, there's some odd highlighting in block comments:

image

Possibly because it thinks the 3rd word is the variable name, but that's not always the case when block commenting on non-methods.

The following example works, because it has a variable name:
image

Auto-closing tags problem

I apologize if this is the wrong place to ask this, but don't know where else.

I'm having trouble with the way atom closes html tags while I'm editing a .vue file.

I have my tag and within that I for instance create a

and then an .
When I go to type </ it auto-closes with
instead of .

Wondering if anyone else has this issue? Any ideas?

Highlighting data broken on hyphened props

Hi, thanks for this plugin!

The following code is getting hihglighted as expected:

:prop="[{
  bar: foo
}]"

While this one doesn't:

:prop-prop="[{
  bar: foo
}]"

It would be nice to support it as well :)

Unexpected Token <

When I have a script tag inside a vue single file component, I get this error for the template tag part.

image

Anything I can do that atom/es-lint knows this is valid?

Stylus syntax not colored with stylus package 2.1.2

Hi there,

many thanks for this great plugin. There seems to be an issue with the newest stylus atom package – version 2.1.2 – as the syntax coloring is completely disabled (running Atom Beta 1.5.0-beta3 on OS X).

Any help would be greatly appreciated.

support for pug

jade was renamed to pug.
Syntax highlighting doesn't work..

<template lang="pug">
div.class
</template>

I think support for jade should stay, for backwards compatibility.

Support for linters

Will this support integration with linters? (Sorry, can't help as I'm not at all familiar with the code of atoms). I'm using tslint.

Visibility of wrapping tags

I find the wrapping tags such as <template></<template> a bit distracting from the actual code. Is it possible to turn those slightly translucent?

Cannot tab complete custom elements in .vue files

Not sure if this is should even be the job of this package, but tab completion for custom elements in .vue files, like <router-link> does not seem to be supported, so I have to manually create custom elements, which is not fun, to say the least. Just looking for a way to do this in atom, so I don't know if this package should support that, or if it should be the job of atom or another package.

Advantages over treating .vue file as .html file

Hey! Thanks for this package, I'm a long time user myself.

Today I got a fresh Atom install after some time and first tried to open .vue file as .html file (can be configured with file-types package too automate) and found out I get html, css and js highlighting and standard Atom code completion & snippets support.

I'm curious, is this something new for Atom or did they add this lately? Then I'm curious what atom-vue gives you in addition to that?

... not properly marking the file with a relevant scope

AtomLinter/linter-htmlhint#49 :

Looks like this is an issue with language-vue not properly marking the file with a relevant scope, as such Atom is attempting to guess the scope and giving it text.html.basic, which this linter says it can handle.

You should report this as an issue over on the language-vue package, [...]

Which I hereby do... Not sure how all this scoping works, but text.html.basic seems not to be the correct scope for vue files.

Ctrl + R doesn't work

Hi~
I used "ctrl + r" to find the method. but it doesn't work in the vue file

Keystroke Command Source Selector
ctrl-r symbols-view:toggle-file-symbols Symbols View platform-win32 atom-text-editor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.