I want to add a keybinding in dotspacemacs/user-config, to execute and external "elm-format" command, in the elm-layer, with some parameters:
elm-format --yes current-file.elm
I couldn't find how to do it, what I found on how to define keybindings is:
(define-key elm-mode-map (kbd "f") 'elm-format)
So I'm not sure about somethings here:
- How do I know which keymap should I be adding a keybinding to? It wasn't clear by just reading the elm layer code [1]
- Reading the elm layer code, the way they define what the keybinding should is with a single quote prefix " 'elm-package-refresh ", but that's not a command at all so I guess it's referencing something external? How should I put a command there?
Let me know if you need any further clarifications.
[1] https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/elm