Fork me on GitHub
#spacemacs
<
2016-12-14
>
zane17:12:58

What is the right way to create a layer for a package that's in a package repository rather than ELPA?

mahinshaw17:12:06

It’s used in a few places in spacemacs

zane17:12:34

Ah, I see it in the docs too.

zane18:12:21

Is there a trick to using spacemacs/set-leader-keys-for-major-mode?

zane18:12:01

This doesn't work:

(spacemacs/set-leader-keys-for-major-mode 'clojure-mode
      "zz" 'sayid-trace-ns-by-pattern
      "zx" 'sayid-get-workspace)
but this seems to
(spacemacs/set-leader-keys
      "zz" 'sayid-trace-ns-by-pattern
      "zx" 'sayid-get-workspace)

ag18:12:42

@zane I think you have to wrap this in with-eval-after-load ‘clojure-mode

zane18:12:54

Let me try that.

zane18:12:13

I tried evaluating it by hand with , e e after clojure-mode was already loaded, which didn't work.

zane18:12:37

Huh. That works but it appears to be binding the functions to , z z and , z x. Is that expected, @ag? I would have expected them to be bound to SPC z z and SPC z x.

zane18:12:41

Ah, it appears that > Spacemacs uses SPC o as a reserved prefix for user-specific bindings, and SPC m as a prefix for bindings that are specific to the major mode (filetype). https://www.reddit.com/r/emacs/comments/3qffbu/spacemacs_using_two_leader_keys/

ag18:12:40

@zane as I far as I know you cannot change SPC etc mappings to work differently for different modes, which totally makes sense