This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-05
Channels
- # announcements (13)
- # aws (1)
- # bangalore-clj (4)
- # beginners (66)
- # boot (11)
- # calva (27)
- # cider (27)
- # clj-kondo (76)
- # cljdoc (6)
- # cljs-dev (38)
- # clojars (3)
- # clojure (143)
- # clojure-dev (2)
- # clojure-europe (6)
- # clojure-greece (10)
- # clojure-italy (10)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-sweden (1)
- # clojure-uk (19)
- # clojurescript (49)
- # cursive (13)
- # datomic (14)
- # duct (6)
- # figwheel-main (3)
- # fulcro (31)
- # funcool (7)
- # jobs (3)
- # keechma (142)
- # liberator (1)
- # off-topic (15)
- # om (2)
- # reagent (1)
- # reitit (2)
- # remote-jobs (1)
- # rewrite-clj (73)
- # shadow-cljs (21)
- # spacemacs (18)
- # sql (5)
- # tools-deps (10)
- # yada (1)
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:
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 馃槙
More to the point: does anyone know away to use fancy symbols in clojure-mode without screwing up the indentation in the file?
@eggsyntax, I am currently enjoying Fira Code https://github.com/tonsky/FiraCode
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.
I am using that font, too. But i am not sure that relates to the indentation problem?!
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/
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
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
.
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.
@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 ->>
@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)
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)