GithubHelp home page GithubHelp logo

Features request: formatting about alive HOT 3 CLOSED

monroth avatar monroth commented on July 19, 2024
Features request: formatting

from alive.

Comments (3)

nobody-famous avatar nobody-famous commented on July 19, 2024
  1. Yeah, it shouldn't do that. Easy fix, though. It's viewing the comment as the next form in the file so putting it on its own line.

  2. I'll add that. I thought I did already, but apparently not.

  3. Do you have an example of what it's doing? I haven't used parinfer.

from alive.

nobody-famous avatar nobody-famous commented on July 19, 2024

Sorry it's taken me forever and a day to get this published. Some of the other stuff I wanted to get in turned out to be more work than expected and, well, life...

Both of these should be fixed in the version I just pushed. I added an option alive.format.maxBlankLines that specifies the max number of lines between top level expressions.

from alive.

monroth avatar monroth commented on July 19, 2024

i found example of one of my old files with behaviour, described at (3)
indentation in this file is wrong, but it is consistent with rule "if next line begins after opening of parenthesis, then it is inside it"

(defun main (&key (delay 2000))
  (sdl2:with-init (:video)
    (sdl2:With-Window (window :Title "test" :w *screen-width* :h *screen-height*)
      (let ((screen-surface (sdl2:get-window-surface window)))
         (sdl2:fill-rect screen-surface
          nil
          (sdl2:map-rgb (sdl2:surface-format screen-surface) 0 0 0))
         (sdl2:update-window window)
         (sdl2:delay delay)))))

if i try to format it with parinfer (with smart mode on), then it formats it to this

(defun main (&key (delay 2000))
  (sdl2:with-init (:video)
                  (sdl2:With-Window (window :Title "test" :w *screen-width* :h *screen-height*)
                                    (let ((screen-surface (sdl2:get-window-surface window)))
                                      (sdl2:fill-rect screen-surface
                                                                                    nil
                                                                                    (sdl2:map-rgb (sdl2:surface-format screen-surface) 0 0 0
                                                                                                                (sdl2:update-window window)))
                                      (sdl2:delay delay)))))

from alive.

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.