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
lsp-keymap-prefix not working #1672
Comments
It is counter-intuitive how that doesn't work. I think it depends on when you call the
The The lsp-mode docs show customization of the prefix by putting the |
the issue is that you should set the prefix before lsp-mode has been loaded and I am not quite sure how to achieve that with use-package.
This works fine too. I am closing the issue but it could be used for further discussions. |
Yes, the key is "set the prefix before lsp-mode has been loaded ". My problem was that I loaded ccls before lsp-mode. Seems that ccls loaded lsp-mode (without set the prefix). I fixed it by adding ":after lsp" in when loading ccls package:
|
I know that this issue has been closed, but I wonder whether it was worth revisiting. I have just hit the same problem caused by loading This could be implemented by having a Happy to send a PR if this would seem to be reasonable. |
@phillord what about using setter for the defcustom? |
@yyoncho Not sure I understand. It doesn't have one at the moment. As far as I can see, we'd just need to call
and then re-run the which-key integration. So a simple function which wraps that lot up, updated documentation and updating the defcustom to use this as a set function. Is that enough, or am I missing something. Can change this into a PR if wanted. |
I meant instead of having this as part of a separate function it seems like having it part of the setter might be more convenient. (defcustom lsp-keymap-prefix "s-l"
"lsp-mode keymap prefix."
:group 'lsp-mode
:type 'string
:package-version '(lsp-mode . "6.3")
:set (lambda (sym val)
;; unbind old value
;; bind new value, update which-key, etc.
)) |
I'd go the other way. Have this as a function, then call that function as the |
Even if I do this,
outside I still prefer to put |
Hi, I set prefix for lsp-command-keymap by
(setq lsp-keymap-prefix "C-S-l")
.With describe variable i can see:
But all the lsp functions are still have
s-l
as prefix:How set the prefix correctly?
The text was updated successfully, but these errors were encountered: