-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Sublime Text Plugin #17
Comments
Not yet! Someone else needs to build :) A PR would be great (even if it's just a link to another package) |
I feel the library is trending too fast for me to get inspired and learn how to write Sublime Text plugins ;) |
You can however put it as a build system in sublime text, where it's just the cli command with the current file as argument (and with |
Prettier seems great. I've been using a different sublime text plugin but it stopped working some time ago but it was pretty easy to swap out the node formatting package to use prettier. This is very much a WIP if your interested https://github.com/jlangston/sublime-jsprettier |
@jlangston hah, you beat me to it. Here's my WIP: https://github.com/danreeves/sublime-prettier |
@danreeves nice work! I figured a few might pop up around this. That said if one person's plugin is of better quality or offers a stronger feature set with either the editor or the formatter I'd be in favor around collaborating towards a more 'official' sublime prettier plugin we can add to package control. Doesn't matter if it's based off of the one I started or not. Either way this is great lots of promise around this formatter. |
@jlangston agreed, I'm up for discussion. This is the first Sublime plugin I've made so I couldn't tell you about best practices in the space. I noticed yours bundles some JS files and requires an npm install inside the package. Personally, I'd rather have the package defer to a global (or local to the project) installation of Yours does have a few nice options though; autoformat, file extensions. |
Have added a link in #143 |
@danreeves We can defer to a global install or bundle it in the repo. Does your plugin support formatting just a selection vs an entire file? If it's something you'd like to spearhead maintaining we can move with your repo and just add whatever features we feel are missing. Things like auto format aren't that hard to add. I think we just want it to be configurable and expose whatever options the formatter supports and be able to act on a selection or an entire file. Also @scottwarren thanks for adding a PR but I do think we should probably have the prettier README link to whichever plugin we collectively nominate to back and get that one into Package control and link to that page from the prettier README so it's an easier install for users. |
@jlangston It doesn't support it yet but from what I've written so far it would be a pretty simple addition. I'm happy to get started on adding these features and maintain it. |
Looks like @jonlabelle has already made a PR to packagecontrol.io, and his versions already supports using either a prepackaged or globally installed EDIT: |
Hey @viankakrisna, if you're using the plugin linked from the readme you might get a better response from at its repo: https://github.com/jonlabelle/SublimeJsPrettier You could also clarify the issue. I'm guessing it's the extra indentation of the function arguments, weird indeed. |
yeah, overall it's just a wacky formatting. I'm using the one from the package control. is it the same? |
will post the issue on its repo, i think it's the same |
@viankakrisna Yep, that's the one 👍 @jlongster This issues was resolved by #318 so should be closed? |
I think the issue is with prettier 0.11.0, 0.0.10 works fine |
I am using an alternative solution for sublime. Just thought I'd share, in case there are any other eslint users. I use this eslint plugin, to pass prettier rules to eslint This this plugin to warn me on errors inside sublime Then this package to simply autofix via eslint --fix I like it because I can place the rules I want to pass to prettier in my eslint config file checked into git vs matching my rules in the jsPrettier user settings with my eslint config. eg:
|
Does prettier have any sublime text plugin? The README only mentions Atom and emacs.
The text was updated successfully, but these errors were encountered: