Fork me on GitHub
#spacemacs
<
2019-07-05
>
eggsyntax15:07:43

Has anyone else found that fancy symbols have started to result in incorrect indentation in the files? I would swear that behaved properly for me for years, until sometime in the last few months. In my editor:

eggsyntax15:07:51

In the file (viewed with vim):

eggsyntax15:07:49

Historically, as far as I know, the file was always correct, and spacemacs just compensated it in the view. But that's no longer true 馃槙

eggsyntax15:07:43

More to the point: does anyone know away to use fancy symbols in clojure-mode without screwing up the indentation in the file?

eggsyntax17:07:42

I think I decided against that at one point because it wasn't clear that it'd work with spacemacs, but you've got that combo working? It was a while ago for me, so the situation may have improved.

spfeiffer18:07:18

I am using that font, too. But i am not sure that relates to the indentation problem?!

eggsyntax19:07:58

I haven't tried it, but I think it might? Because it uses ligatures, they're (at least potentially) multi-space characters. I'm basing the above on the "Caveats" section of http://www.modernemacs.com/post/prettify-mode/

lread21:07:16

yeah @eggsyntax it seems to be working fine. I installed and configured emacs-mac following these instructions https://github.com/syl20bnr/spacemacs/issues/6972#issuecomment-365945351

eggsyntax21:07:54

Cool, thanks!

eggsyntax21:07:45

And then just as a clarifying question -- in the Clojure examples on the Fira Code page, I'm only seeing changes to non-word chars (equals variants, arrows, etc). Does it also include changes to word chars, eg fn to ? It seems like it wouldn't, since you wouldn't want eg Hefner to become He位er.

lread21:07:56

I do not see lambda symbol in my code. So your guess seems right. If you have some time you might enjoy watching tonsky鈥檚 video from Clojure North https://www.youtube.com/watch?v=l1b7Da2DnPo It covers Fira Code.

馃憤 4
spfeiffer07:07:42

@eggsyntax No, fn -> \lamba is done by pretty-symbols and has nothing to do with FiraCode. With Firacode, you get nicer ligatures on symbols like ->>

馃憤 4
practicalli-johnny18:07:52

@eggsyntax I just enabled fancy symbols and when I rebooted it was initially showing mis-aligned indentation with a lambda function. However, after editing the code, the agressive indent seems to correct it. I have this enabled in .spacemacs (add-hook 'clojure-mode-hook #'aggressive-indent-mode)

practicalli-johnny18:07:50

Or it could also be either of these correcting it https://github.com/clojure-emacs/clojure-mode#indentation-of-function-forms (setq clojure-indent-style 'align-arguments) Vertically align s-expressions https://github.com/clojure-emacs/clojure-mode#vertical-alignment (setq clojure-align-forms-automatically t)

eggsyntax19:07:32

Awesome, thanks @jr0cket! I'll try those out.

eggsyntax19:07:21

Follow-up -- no luck with any of those. I haven't updated in a while, though, it's possible I need to. @jr0cket I assume you're on develop?

practicalli-johnny20:07:01

Just updated to latest develop today

馃憤 4