Nova

Extensions


Readme

Vue for Nova editor

This is a plugin providing Vue language support for the new Nova editor from Panic. Inspired by Vetur and many other great Vue tools.

WARNING: If you want to use PUG in your template you first have to install an extension that provides you PUG syntax, otherwise Nova will crash. Panic has been notified of this issue.

Modes 🔥

The extension now support two different mode: Classic and Vetur! You can set it in the global extension preferences and also on a project based.

In the future I'll look into a way of combining the best of both worlds, in the meantime which one should you use? Of course is up to you 😉

Vetur (default)

A complete Vetur like mode with all the great features you are already used to.

Classic

Ad hoc completions for Nova and great snippets for faster development.

Special theming 🎨

The extension offers an easy way to improve the highlighting in Vue file.

Hooks

This is an example of implementation with all the available hooks:

/* Vue */

vue.html.tag.open,
vue.html.tag.close {
    color: #59be84;
}

vue.html.tag.name {
    color: #59be84;
    font-weight: bold;
}

vue.html.tag.attribute.shorthand-key {
    color: #59be84;
}

vue.html.tag.attribute.name,
vue.html.embedded.interpolation.bracket {
    color: #65c032;
    font-weight: bold;
}

vue.html.tag.attribute.argument {
    color: #59be84;
    font-weight: bold;
}

vue.html.tag.attribute.modifier {
    color: #59be84;
}

Supported themes

All themes which support this feature are listed here.

State of development 🧑‍💻

Features supported

  • [x] Generic Vue Tags
  • [x] Template Tag
  • [x] Script Tag
  • [x] Style Tag
  • [x] Vue Directives
  • [x] Vue Interpolation
  • [x] Completions for HTML, CSS, JS and WebAPI
  • [x] Completions for Vue API
  • [x] Completions for Vue Directives
  • [x] Completions Vue Events (@click)
  • [x] Support for typescript and coffeescript
  • [x] Support for scss, sass and less
  • [x] Vue Clips (based on Vue VSCode Snippets)
  • [x] Support for Vetur LSP
  • [x] Refined class selectors for improved highlighting
  • [x] Support for PUG Syntax

Features on their way

  • [ ] Support for jade (waiting for syntaxes)
  • [ ] Support for stylus and postcss (waiting for syntaxes)

Contributing 🤝

You are welcome to contribute in any way you can think of. Seriously, I am not an expert in these things 😅.

Maybe take a look at the CONTRIBUTING guidelines. Nothing fancy don't worry.

Thanks!


Changelog

Version 3.4

FIX

  • Removed single template block syntax which causes problems in Nova 4

Version 3.3

FIX

  • Fixed broken single template block syntax in Nova 4

Version 3.2

FIX

  • Fixed broken script and style blocks syntax in Nova 4

Version 3.1

DOCS

  • Added warning for Nova crash without pug extension

Version 3.0

FEATURE

  • Added support for PUG syntax

Version 2.3

CHORE

  • Upgrade VLS to v0.5.7

Version 2.2

FEATURE

  • Added the extension icon

Version 2.1

FIX

  • Fixed syntax error with v-directives cut-off

Version 2.0

FEATURE

  • Added support for template interpolation suggestions
  • Configured Vetur for using workspace dependencies
  • Typescript: Auto import completions

CHORE

  • Upgrade VLS to v0.5.5

FIX

  • Closed Vetur format until Nova will support it
  • Closed Vetur validation for preventing xxx errors to show up

Version 1.5

FIX

  • Changed cut-off expression for v-directives that could cause the js block to not end correctly

Version 1.4

REFACTOR

  • Changed how template tag is parsed
  • Improved symbols definition for vue elements

FIX

  • Supported nested template tags

Version 1.3

FEATURE

  • Added Vue specific styling hooks for Nova themes

DOCS

  • Added funding link in Extension Settings

Version 1.2

Chore

  • Changed default mode for the extension
  • Updated the help link for mode config

Version 1.1

Fix

  • Upload the DOCS changes

Version 1.0

Feature

  • Add the Vetur mode 🔥

Version 0.9.1

Fix

  • Removed forgotten preference in the extension definition.

Version 0.9.0

Feature

  • Added scaffolding Clips based on Sarah Drasner VSCode snippets.

WARNING: The Clips even if inspired by Sarah Drasner are not exactly the same. Triggers are different and the basic Vue scaffold has no longer scss but css.

Version 0.8.2

Fix

  • Added different definitions for vue-directives single and double quoted in order to prevent errors with nested quotes

Version 0.8.0

Feature

  • Added support for typescript and coffeescript
  • Added support for scss, sass, less

Fix

  • Added missing equal-sign to v-for completion

Version 0.7.1

Docs

  • Updated README with current state of development

Version 0.7.0

Feature

  • Added Completions in vue-html for events, triggered by @ shorthand.

Fix

  • Changed vue-html syntax to encapsulate javascript inside vue-directives quotes.

Refactor

  • Changed Vue Completions structure to follow the Official API structure.

Version 0.6.2

  • Added support for npm packages.
  • Removed no longer needed completions thanks to a bug fix from Panic.

Version 0.6.1

Fixed a minor bug that displayed html, css and js completions in every tag. The completions are now shown only in the corresponding vue tag.

Version 0.6.0

Added support for standard HTML, CSS, JS and WebAPI Completions.

Version 0.5.1

Updated CHANGELOG with previous versions.

Version 0.5.0

Added Completions for Vue API.

Version 0.4.0

Basic features of Vue Syntax: custom tags, directives, interpolation.


License

MIT License

Copyright (c) 2020 Tommaso Negri

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.