This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-02
Channels
- # announcements (1)
- # beginners (119)
- # calva (2)
- # cider (40)
- # cljsrn (14)
- # clojure (145)
- # clojure-dev (122)
- # clojure-europe (4)
- # clojure-italy (9)
- # clojure-nl (5)
- # clojure-spec (2)
- # clojure-uk (32)
- # clojuredesign-podcast (1)
- # clojurescript (10)
- # cursive (44)
- # data-science (1)
- # datomic (53)
- # defnpodcast (6)
- # emacs (6)
- # fulcro (13)
- # garden (25)
- # graalvm (3)
- # graphql (7)
- # jobs (3)
- # liberator (4)
- # nrepl (1)
- # off-topic (21)
- # quil (27)
- # reagent (4)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # shadow-cljs (3)
- # spacemacs (24)
- # sql (29)
- # tools-deps (68)
- # xtdb (2)
Does this finite-state-machine diagram accurately model a spacemacs-like menu? I’m working on a program that has a similar mnemonic menu while also learning state machines. Figured this would be the best place to ask 😅
looks right I think, but it’s hard to tell without Submenu. So in what state the Previous (main menu) would be when Sebmenu activates?
Spacehammer currently keeps the main modal active even when you are in a sub-modal, which is not right. e.g. when you press Cmd+SPC
then m
- it opens Multimedia modal, but Main modal keys are still active, you still can press w
and jump to Windows modal - this isn’t right
https://github.com/eccentric-j/spacehammer/blob/develop/modals2.fnl it is crudely solved in my solution. I create a new hs.hotkey.modal every time a menu is activated. Upon activating a new modal, it clears bindings before setting new ones by deleting the hotkey modal. It seems to work pretty well, even got the repeatable: true flag in the top config working so things like volume can be repeated. In terms of an FSM I think it would be about responding slightly differently when transitioning to active while already active
It stores a list of active paths in the state atom
So like [:w :m] would look up the menus for window bound to :w, then the submenu move bound to :m
It’s kind of a good thing you did not get a chance to write it. A coworker wants to use a FSM to solve a problem at work and up until the past two days, I didn’t know much about them. I would not be able to help design it or even review it. This project is a great opportunity for me to learn how to implement one on my own given your pretty solid framework 😁
Oof I am interested in using this package with spacemacs https://github.com/emacsmirror/fennel-mode but I’m not sure how to add it. I don’t think it’s on MELPA which means I have to clone it somewhere?
Oh! Sorry about that, I was looking at the readme instructions. I’ll just wrap it in a spacemacs layer then. Thanks!
Hah wow wrapping it in a layer was ridiculously easy.
you may wanna do something like this:
(use-package fennel-mode
:init
(autoload 'clojure-align "clojure-mode" nil t)
:config
(spacemacs/set-leader-keys-for-major-mode
'fennel-mode
"fl"
'clojure-align))
Thanks, I’ll try that out
Hey folks! Anyone know a good way to hard-wrap an HTML document in SM? fill-region
results in ugly (but presumably valid) line breaks, eg between a
and href
. Any option that's a bit more sensitive to the HTML-ness of the buffer?
yup http://web-mode.org confirms that
Hmm, still doesn't do very well for me. eg doing M-q
on a single (very long line) leaves me with (excerpt)
<p>If you've moved or changed your name, please update your voter registration.
We can help you get started at <a
href="https://{{recipient.hostname}}/">{{recipient.hostname}}</a>. Once that's
done, you should <a
Again, presumably valid, but pretty unpleasant for the reader.
That said, this is using the hbs
wrapper around handlebars, so it may not be recognized as a valid template file. Does say it's in web-mode, though.
As a sanity check (since I'm evil-mode), I've got M-q
bound to fill-paragraph
. I assume it's the same for you?Oh, no, that web-mode
page does have hbs
listed, so it's not that.
Oh well! "Pretty" as well as valid may be asking too much 🙂