Giter Club home page Giter Club logo

Comments (3)

dbarnett avatar dbarnett commented on June 10, 2024

Hadn't heard about ruff yet but it looks great!

As a formatter, do you know if

  • it has built-in support for range formatting (updating only a few target lines out of a file, plus whatever surrounding lines it needs to touch to make a complete valid formatting change)
  • its formatting decisions tend to be stable (avoid fighting with existing valid formatting when there are multiple valid ways to format a piece of code, such as a list that's short enough to fit on one line)
    ?

from vim-codefmt.

st1020 avatar st1020 commented on June 10, 2024

@dbarnett As far as I know, ruff is more of a linter than a formatter. But because it has autofix support, it can also be regarded as a formatting tool (and it also have some rules related to code format).

  • Yes and no, ruff not support range formatting as a command line tool, but can support range formatting with ruff-lsp.
  • Yes, I think, as a linter, all rules that can be autofixed have only one way to autofix. So it not has "multiple valid ways to format a piece of code".

from vim-codefmt.

Bidaya0 avatar Bidaya0 commented on June 10, 2024

Hadn't heard about ruff yet but it looks great!

As a formatter, do you know if

  • it has built-in support for range formatting (updating only a few target lines out of a file, plus whatever surrounding lines it needs to touch to make a complete valid formatting change)
  • its formatting decisions tend to be stable (avoid fighting with existing valid formatting when there are multiple valid ways to format a piece of code, such as a list that's short enough to fit on one line)
    ?

Sorry for the late reply, the situation with the library is basically as described by st1020

  • For range formatting, I found a related issue in ruff-lsp, but there is no built-in implementation
  • yes, its formatting decisions tend to be stable .

from vim-codefmt.

Related Issues (20)

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.