Git Product home page Git Product logo

nova-beautify's People

Contributors

patrickvuarnoz avatar castles avatar

Stargazers

Greg Wolanski avatar lesserror-hxr avatar Santiago avatar Dongkyu Kim (Max.kim) avatar

Watchers

 avatar

nova-beautify's Issues

Format on save option

Hi, thanks for the extension. This is a question, not an issue: how to make it format on save? Thanks.

[Feature Request]: Consider allowing to load an external JS Beautify script/automatic updater

First of all, thanks for doing this Nova extension :) It's tremendously useful, especially when I have things that Prettier doesn't format properly (that's why it is an opinionated formatter, after all) — such as HTML5 (long story...)

Anyway, I've noticed that you include js-beautify.js directly, and call its functionality by including the file in the extension-provided file. I noticed that you currently have a slightly outdated version of thos e script, and wondered if I couldn't replace it with a new version without touching your code.

Some extensions (a few of my old ones included!) simply allow an external script to be set via the Preferences panel; your extension could try to use that first, and fall back to the internally distributed version otherwise. This is mimicking what others do, even though the ones I know about actually include an external command-line application, which isn't the way you're using JS Beautify — therefore, there might be some Nova-imposed sandboxing limitations to do just that.

An alternative would be to allow the JS Beautify JavaScript file to be remotely included from a CDN. That way, you could always get the 'latest' version automatically, without the need to upgrade the extension and publish a new release. Again, I'm not sure if you can do that from within the sandboxed extension, either.

I know that you can execute things on the Mac — or else those other extensions (including mine!) would not be able to run the content of a file and capture the output from it and present it inside the Nova editor. I'm assuming that you can do the same — essentially, using wget or curl to check for the 'latest' version, and download it automatically, or possibly manually via a 'check update' button on the Extension Preferences) to the temporary workspace set up by Nova for the current run of your extension.

Running JS Beautify from the CLI (inside Node) might also help those preferring to stick to configurations using .jsbeautifyrc files...

Can such a thing be implemented?

Thanks for any insights

Mac Keyboard Shortcut not working in Nova

Hello,

According to Nova, the keyboard shortcut to use Beautify is (Shift)(Option)F. However, this inserts the following symbol instead: Ï, instead of actually triggering Beautify.

Can this please be changed to another shortcut that works? Thank you! :-)

Return to Top of Document After Format

While of course having a format on save option would be by far the most ideal option like other similar systems, in the meantime, when using the extension it seems to always jump to the bottom of the document after selecting all and formatting rather going to the top of the document. Dreamweaver for decades has had the best beautifer, and plenty of websites work great as well but for extensions for Coda, then Atom, then Nova they have always been problematic. This is the first extension that seems to work very well at least with standard HTML/PHP/CSS mixed code, so hoping the return to top is added soon, and again while I'm sure it's on the todo, hopefully format on save will be added soon, which will be a life saver for me may fellow developers whos use it.

Support for .Liquid files

Shopify .liquid files is essentially HTML that has additional bracketed tags.
If you could allow beautify to work on .liquid files exactly as it does on HTML files that would be amazing.

Currently I have to:

  1. toggle my .liquid file to html
  2. Run Beautify
  3. toggle html file back to liquid format

Unformatting

I'm using gulp-file-include to include partials in my html files. This is how I call for partials:

     @@include('footer.html')
     @@include('scripts.html')

Beautifying removes the indentation and merges two includes in a single line like this:

@@include('footer.html') @@include('scripts.html')

Any chance to add exceptions for @@include so those lines stay unformatted?

Configuration

Is it possible to make configurations on how Beautify works?

Project Settings

Would it be possible to add the “Project Settings” capability, so one can set the option on a project basis?

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.