Coder Social home page Coder Social logo

Comments (6)

numToStr avatar numToStr commented on May 21, 2024

To be clear you want the following to be configured.

local foo = "bar" -- comment
--               ^
--         This padding

Your request seems usable but it's useless in most cases. Because most of the formatters only prefer one space between the end-of-line and the start of the comment. They'll just remove extra whitespace in b/w. So personally, I am not a fan of this idea even if this is just for norm_A. Thoughts??

from comment.nvim.

kosayoda avatar kosayoda commented on May 21, 2024

The Python style guide recommends two spaces between the statement and the comment:

Inline comments should be separated by at least two spaces from the statement. They should start with a # and a single space.

from comment.nvim.

numToStr avatar numToStr commented on May 21, 2024

Seriously! That is odd (maybe because I never wrote python 🤷🏻). A question though, Does python formatter automatically adds 2 spaces if it found 0 or 1 space b/w statement and comment?

from comment.nvim.

kosayoda avatar kosayoda commented on May 21, 2024

Yes, you can see that here: Example with Black

from comment.nvim.

numToStr avatar numToStr commented on May 21, 2024

Thanks for explaining. I'll see what I can do about this.

from comment.nvim.

numToStr avatar numToStr commented on May 21, 2024

I've added a patch for python for now. We'll see If someone wants to configure it manually.

from comment.nvim.

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.