Coder Social home page Coder Social logo

indenter's People

Contributors

cecton avatar decathorpe avatar jameswestman avatar nemo157 avatar obmarg avatar regexident avatar yaahc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

indenter's Issues

Proposal for code indentation

Hello ๐Ÿ‘‹

I made another indenter but for a different use case: to indent code. This is useful when you want to output code in a build.rs script for example. Particularly if the code generated is in an different language than Rust.

I already made the formatter struct there: https://github.com/cecton/code-formatter

Before I make yet another crate on crates.io, I thought maybe it would be nice to join effort. The downside for you is that it increases the original scope of your project because it indents & dedents, and also the use case is different (indenter's use case is to format error messages while this one is to format code).

Let me know if you want to join effort. If you accept, I will update the documentation accordingly to include the bigger scope of this crate.

Support io::Write

Hello!

I'm not sure I understand the split between std::io and core::fmt Write, but it seems to me that this library would be useful for both traits. The io trait seems more commonly used than fmt.

Does it seem within scope of this library?

Cheers,
Louis

please include license files in git repo + published crates

We're packaging this crate for Fedora Linux as a dependency of eyre and miette, and this came up during a routine review. The project doesn't include any license texts, but both the Apache-2.0 and MIT licenses require that a copy of the license terms is included in redistributed copies of the project.

Not having license texts included in the sources is a potential legal problem for Linux distributions, but arguably also for redistributing crate sources via crates.io.

CodeFormatter should use `T: ?Sized + fmt::Write` instead of `T: fmt::Write`

That way CodeFormatter<'a, dyn fmt::Write> is usable. This is trivial (bounds just need to gain : ?Sized), non-breaking, and has no real downsides AFAICT.

The only reason this is an issue and not a PR is that it would have a merge conflict with #15, so I'll wait for that one to resolve either way first rather than having a mid-air collision with myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.