Thursday, July 22, 2021

Vim autoindent for scheme "#;" comments

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?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/05218604-e127-4963-8e7a-28ee5cb545f9n%40googlegroups.com.

No comments: