nova-beautify's People
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.
Bug: Blank space added for one-line, no-content nodes
[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:
- toggle my .liquid file to html
- Run Beautify
- 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?
Add configuration setting for indent_empty_lines
JS-Beautify added this "indent_empty_lines" feature in v1.9.1 in March 2019. Default is false.
beautifier/js-beautify#1322
It would facilitate unbroken indentation guides.
Could you please consider adding this as a configuration boolean to be passed to the script?
![Screenshot 2024-01-08 at 10 05 21 AM](https://private-user-images.githubusercontent.com/1698951/294961886-f8a136e5-a4ce-4078-9886-09d31cebcca6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1NDA3MzUsIm5iZiI6MTcyMTU0MDQzNSwicGF0aCI6Ii8xNjk4OTUxLzI5NDk2MTg4Ni1mOGExMzZlNS1hNGNlLTQwNzgtOTg4Ni0wOWQzMWNlYmNjYTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjFUMDU0MDM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjA1NmZhYmJiMTA0NDAzOWY1ODhmOWU3NjBjYzE0NmFhMGJjZDgwN2QwZGRmZGM0NDkwMDI0YWFiZjRmM2EyYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.polAIMHtD4YPGww98ottZW6ApEdjuQ7CAhWIDRQJ1L8)
Emptying a config option (type=text) re-applies the default
This can be seen in Nova Build 540540 (11.4) when emptying the "Extra lines before" field as reported here:
#1 (comment)
Project Settings
Would it be possible to add the “Project Settings” capability, so one can set the option on a project basis?
Clips cannot be beautified and crashed Nova
I tried beautifying one of my clips and Nova simply crashed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.