Vim autoindent for scheme "#;" comments

11 views
Skip to first unread message

Jagi125

unread,
Jul 22, 2021, 5:23:10 AM7/22/21
to vim_use
So, I've recently started learning scheme lisp and found what I believe is a bug in Vim, regarding one-keyword-comments and indentation. But as I'm new to lisp, I think it's better to confirm that I'm not missing some option, before spamming the vim mailing list. Also I couldn't find anything about it either in :h todo nor on ddg/google.

Consider the following function with the expected indentation:

(define (lookup key #;in mapping)
  (let* [(((name . value) . remaining) mapping)]
    (if (eq? key name)
      value
      (lookup key remaining))))

Contrary this is how Vim indentates it automatically:

(define (lookup key #;in mapping)
                (let* [(((name . value) . remaining) mapping)]
                  (if (eq? key name)
                    value
                    (lookup key remaining))))


Now, removing the #;in comment, the indentation works as expected.
Finally I set for editing scheme files

:se filetype=scheme
:se lisp

Am I then missing an option?
Reply all
Reply to author
Forward
0 new messages