Skip to content
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

Autoformat on save #28

Open
foadgr opened this issue Jan 13, 2020 · 1 comment
Open

Autoformat on save #28

foadgr opened this issue Jan 13, 2020 · 1 comment

Comments

@foadgr
Copy link

foadgr commented Jan 13, 2020

Options to "autoformat on save", similar to settings as seen in prettier (or JsPrettier for Sublime Text 3) would be useful. Shown below is a snippet copied from JsPrettier.sublime-settings:

	// Whether or not to automatically format the file on save.
	// ----------------------------------------------------------------------

	"auto_format_on_save": false,

	// ----------------------------------------------------------------------
	// Auto Format on Save Excludes
	// ----------------------------------------------------------------------
	//
	// @param {array} "auto_format_on_save_excludes"
	// @default []
	//
	// Ignore auto formatting when the target file, or its path resides in a
	// particular location, and when `auto_format_on_save` is turned on.
	//
	// Example:
	//
	//     "auto_format_on_save_excludes": [
	//         "*/node_modules/*",
	//         "*/file.js",
	//         "*.json"
	//     ]
@foadgr
Copy link
Author

foadgr commented Jan 13, 2020

Permalink to the line number at which the JsPrettier class method CommandOnSave can be invoked. Still looking into this... https://github.com/jonlabelle/SublimeJsPrettier/blob/9e9a6efaa0988833c9836d67ce6dbb142f74e062/JsPrettier.py#L811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant