-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala: Document the “Prefix Command” groups #2713
Comments
Why don't you propose a list of names for the missing prefixes? |
@justbur The list is here: https://github.com/syl20bnr/spacemacs/tree/master/contrib/!lang/scala I’m not sure how to tag prefix commands, though. |
I think you want |
@justbur That function doesn’t exist anymore, and |
What do you mean? It's defined here https://github.com/syl20bnr/spacemacs/blob/develop/spacemacs/funcs.el#L83 |
Oh, there was an issue with it (23533d0) and it got reactivated. Yet, it’s used (and commented out) only in two places: https://github.com/syl20bnr/spacemacs/search?q=declare-prefix-for-mode&type=Code&utf8=%E2%9C%93 |
Ah, it’s only in develop branch for now, grrr git-flow. Still, not sure if it does what you think it does?
|
Oh that's right. I forgot it was commented out for a while. I guess you're out of luck for the master branch right now. You could use |
@justbur I’m still not sure how I can add a label when the function only takes a mode, a prefix and a name. |
Try copying that function into your (defun spacemacs/declare-prefix-for-mode (mode prefix name)
;; "Declare a prefix PREFIX. MODE is the mode in which this prefix command should
;; be added. PREFIX is a string describing a key sequence. NAME is a symbol name
;; used as the prefix command."
(let ((command (intern (concat spacemacs/prefix-command-string name))))
(define-prefix-command command)
(evil-leader/set-key-for-mode mode prefix command)))
(spacemacs/declare-prefix-for-mode 'scala-mode2 "mr" "refactor") I don't use scala or the master branch, but I don't see why that won't work. |
Uhm, if I understand correctly: So this doesn’t work, since it wants a function name, like |
Did you try it? If you look at the function definition name is used as a string and then interned. |
Hm, you are right. Silly me, coming from statically typed languages … |
Actually, that would explain why the docstring is commented out. It might have applied to a previous version. |
Those functions should be moved to core-funcs.el, weird to have them in spacemacs layer. |
i.e. give them names, like SPC m r
: refactor
The text was updated successfully, but these errors were encountered: