Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong indentation on new line with sly #69

Open
monroth opened this issue Jun 30, 2023 · 0 comments
Open

wrong indentation on new line with sly #69

monroth opened this issue Jun 30, 2023 · 0 comments

Comments

@monroth
Copy link

monroth commented Jun 30, 2023

I'm using parinfer-rust for common lisp with sly.
I define function

(defun calculate-brick (size color steps)
  (let* ((png (make-instance 'zpng:png
                             :color-type :truecolor-alpha
                             :width size
                             :height size))
         (image (zpng:data-array png)))
    (dotimes (y size (zpng:write-png png "example.png"))
      (dotimes (x size)
        (dotimes (i 3)
          (setf (aref image y x i) (elt (gethash color *color-table*) i))) 
        (setf (aref image y x 3) 255)))))

When I turn on sly only, if i insert new line before second to last setf (cursor is right before (setf), it indents setf correctly --- with same amount of spaces
so it goes from this

        (dotimes (i 3)
          (setf (aref image y x i) (elt (gethash color *color-table*) i))) 
        (setf (aref image y x 3) 255)))))

to this

        (dotimes (i 3)
                                                                                                                                                      	  
          (setf (aref image y x i) (elt (gethash color *color-table*) i))) 
        (setf (aref image y x 3) 255)))))

However. when i turn on parinfer-rust-mode and do same (cursor on ( before first setf, press RET), it indents new line very poorly

        (dotimes (i 3))))

    (setf (aref image y x i) (elt (gethash color *color-table*) i) 
        (setf (aref image y x 3) 255))))

and thus change sexp structure.

I have some other packages installed, but i can reproduce this after removing my .emacs file and .emacs.d directory and installing only parinfer-rust and sly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant