You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to incorporate a package for the SuperCollider programming language as a layer into spacemacs. It is all working well but I dont seem to be able to define custom key bindings under , or SPC m.
Click here to see the code of the underlying sclang package (at local/sclang). It defines quite a few bindings starting with C-c in sclang-mode.el. These are working fine.
In the commented out code bellow you can see all the things I tried.
I finally solved this with help from the Spacemacs Gitter channel.
There was a deeper issue with the definition of the major mode itself. More specifically (quoting NJBS's answer on Gitter):
Your issue is that sclang-mode doesn't define itself properly by
deriving from fundamental-mode, but rather it defines itself using
defun. You can change sclang-mode.el's mode definition to the
following and your bindings should stick:
(define-derived-mode sclang-mode fundamental-mode "sclang-mode"
"Major mode for editing SuperCollider language code.
\\{sclang-mode-map}
"
(sclang-mode-set-local-variables)
(sclang-set-font-lock-keywords)
(sclang-init-document)
(sclang-make-document))
I am trying to incorporate a package for the SuperCollider programming language as a layer into spacemacs. It is all working well but I dont seem to be able to define custom key bindings under
,
orSPC m
.Click here to see the code of the underlying
sclang
package (atlocal/sclang
). It defines quite a few bindings starting withC-c
insclang-mode.el
. These are working fine.In the commented out code bellow you can see all the things I tried.
The text was updated successfully, but these errors were encountered: