Scheme: improve alignment for some snippets and add one UltiSnips snippet#1499
Scheme: improve alignment for some snippets and add one UltiSnips snippet#1499Aster89 wants to merge 1 commit intohonza:masterfrom
Conversation
lpil
left a comment
There was a problem hiding this comment.
This will now be mixing tabs and spaces, is that desirable? Until this commit we've used tabs always as this means the user can configure indentation to whatever is their preference.
|
That's intendeed. In scheme functions' and special forms' applications look syntactically the same, i.e. Try to write the following, say, on rextester (or even on Vim itself; I haven't customised anything, so that should be the default), and press enter right before entering the marked character (cond (#f "ciao") (#t "uffa"))
; ^ ^
(cond (#f "ciao") (#t "uffa"))
; ^and you'll get these: (cond (#f "ciao")
(#t "uffa"))
(cond
(#f "ciao")
(#t "uffa"))The latter can all be handled by tabs, but the former can't, it must use spaces because the indentation must exactly be the same width as I'm obviously assuming claiming that having the various "arguments" of functions/special forms be aligned vertically is the right thing to do. (¹) One could claim that the 1st of the 3 arguments to |
|
I understand the intention, what I mean is that with this if the programmer says they wish to indent using tabs we will no longer respect that wish. This is not what we do with any other snippets, including all the other Lisp favours. |
|
In this case, a solution would be to always LineBreak after the function name, as in (cond
(#f "ciao")
(#t "uffa"))
(if
a
b
c)
(define
(fun-name args)
def)
(+
x
y
z) |
|
@lpil , what if I try using |
|
Sorry, we use tabs in this project. |
No description provided.