Comments (9)
Yes, I've started working on a cli tool. A lot of it is already written, but #19 needs to be done simultaneously, and it will involve some changes in the extension as well, and I'd like to refactor the repo as a whole a bit while I'm at it.
I think I'll have a usable version of it by this weekend.
from taplo.
thanks a lot. can't wait
from taplo.
Thanks for the update. I'll wait for the official release so i'll be able to test with standard installation flow.
my main goals are
- format my toml files naturally. got lots of those as apart of the Cargo.toml, i also have all the Makefile.toml files (especially inside cargo-make).
- write a format toml task inside cargo-make so all projects using cargo-make will automatically have access to this capability. (much like rustfmt format task
however to get there i'll need
- a very consistent toml formatter. meaning spacing, end of lines and all that would not break if i just write things too messy.
- ability to pass config via command line. if the task is defined inside cargo-make Makefile.toml than people can just configure it there via the formatter cli instead of having multiple config files.
I see many people do the same thing for clippy for example. - nice to have - later on, we can expand that on having a --check flag to make sure toml is formatted (good for CI)
there was another rust based toml formatter i tried long ago, but it wasn't active and the formatting didn't always work.
happy I have another shot at it :)
from taplo.
works amazing, really fast and great defaults. love it.
i'm going to put some default tasks inside cargo-make for it, i'll update this issue when done if you will be interested.
from taplo.
@sagiegurari Thank you, I'm glad you like it! They should be fixed in 0.1.1
, I think this issue has served its purpose. Feel free to created an issue if you need anything, I also created #55 to discuss formatting option arguments.
from taplo.
@sagiegurari I ended up not having a lot of time, and I will need a few more hours probably. I've pushed the progress so far to a cli
branch in case you really need this feature asap and would like to help with it.
from taplo.
@sagiegurari Sorry, it took way longer than I expected, there is now a CLI tool, however I haven't implemented passing formatter options because it needs additional arg parsing work.
I'm thinking along the lines of a--format-options option1=true,option2=20 ...
flag, would that work for you?
from taplo.
thanks a lot. i'm checking it out :)
from taplo.
Just updated cargo-make 0.32.9 branch with few tasks to do toml formatting.
Basically you can now run:
cargo make format-toml
But more I updated the default task to always format toml files as well.
I'll probably officially release it once you resolve those 2 small issues I opened.
thanks a lot for the great tool. I was looking for such a thing for a long time.
from taplo.
Related Issues (20)
- `taplo-cli` very slow at collecting files HOT 6
- VS Code Extenstion: failed to resolve schema error=failed to resolve relative schema schema_url
- Date ISO 8601 not supported?
- Please update your docker images to taplo-cli 0.9.0 HOT 2
- Taplo rewrites file newlines HOT 2
- VSCode extension is outdated HOT 5
- taplo stability and roadmap ? HOT 4
- Build broken on latest nightly HOT 8
- Cargo.toml dependency version completion returns weird results
- No release on `Even Better Toml` since 2023-07-13 HOT 1
- Regression: `[rule.formatting]` completely overrides the default outside of the specified sections HOT 6
- Code does not support "$ref" tags HOT 1
- Code does not support the openapi "Tags" feature HOT 3
- Sort keys in inline tables
- `Cargo.toml` schema missing some workspace keys HOT 1
- Allow the Even Better TOML extension for VSCode to run in Restricted workspaces
- VSCode extension publishing token expired (and OpenVSIX not uploaded) HOT 1
- `cargo.lock` for `0.9.3` needs to be updated HOT 1
- Vscode taplo toml lsp not working
- Support for [project] key in schema validation HOT 3
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 taplo.