Comments (11)
Hmm. So it doesn't have its own executable? I'm wondering how I'm supposed to figure out where that google-java-format-1.5-all-deps.jar
actually is to be able to run this.
from fmt-micro.
You could probably have a config option in the settings file for that path
from fmt-micro.
If you require the functionality at the moment, just update fmt
to 3.2, then add the path into your own custom formatter like so
"fmt|java": "java -jar /path/to/google-java-format-1.5-all-deps.jar --replace"
This seems like something that would do well to be bundled, so that I can know where it's located. Probably put the .jar
in configs/google-java-format
, but I'll have to keep it updated myself.
from fmt-micro.
Although I think that command might need some work, I didn't check their docs yet on how to do an in-place... Updated previous command, should be good
from fmt-micro.
can't get it to work, how am I supposed to edit the settings?
currently "java-formatter": "uncrustify",
works, should I delete that line or....?
I just added your command/ tried your command + "java-formatter": "",
but it did not work
(and updated your plugin, a shame that micro still has this update bug so I have to manually select the one)
from fmt-micro.
Nah, you can simply create that entirely new option. I added it here 01b3831
It looks for fmt|langname
and uses that instead of whatever is declared in langname-formatter
(if found).
So just copy that entire command, fix the path, then add it as a new line in your settings.json
. Docs
from fmt-micro.
yes that is what I did very first but did not work
never mind now it works, maybe the java execution of the formatter was just bit sluggish, thanks for the super quick response
from fmt-micro.
Then perhaps the command itself doesn't work. I just tested "fmt|java": "echo 'test'"
and it worked.
from fmt-micro.
I downloaded the file and tested on some example code, and it works just fine.
Perhaps you have the wrong path in the settings? There might be a helpful error in Micro's log (CtrlE 'log')
from fmt-micro.
I did edit my post, sorry for the confusion, it works properly, thanks for the quick response!
from fmt-micro.
So I think I'm going to not add this as a built-in formatter, since that would require bundling it with the repo. Bundling would go against the idea of the user supplying their own binaries/whatever and at the version they want.
Plus the custom formatter option works for people that still want it 😄
Once more, I'll post the option for anyone interested
"fmt|java": "java -jar /path/to/google-java-format-1.5-all-deps.jar --replace"
from fmt-micro.
Related Issues (18)
- Support for "unsupported" filetypes
- Add more formatters in v2
- Get JobSpawn working HOT 2
- Should probably use OOP
- Consider a "lang-pref" option
- settings very noisy HOT 9
- Optional user-defined args
- Use display names
- Get formatter on save/run HOT 1
- Add php support
- Add C/C++/C#/ObjectiveC/D/Java/Pawn/VALA support HOT 2
- Add python support
- Respect user settings (when possible)
- Consider auto-editing the uncrustify cfg HOT 1
- Change gofmt to goimports HOT 1
- Use Luacheck recommendations
- Allow for duplicate supported file-types
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.
from fmt-micro.