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] Updated keybindings w.r.t upstream lsp-mode refactoring / additions. #12695
Conversation
1ce5be0
to
5a9e1bb
Compare
Looks good to me! Would you add shortcut also for lsp-treemacs-symbols? I personally would pick another shortcut for executing code actions |
5a9e1bb
to
4e324b1
Compare
Bound lsp-treemacs-symbols under While you're here @yyoncho -- just noticed that the Relevant section of
|
I am unable to reproduce following the instructions from https://github.com/emacs-lsp/lsp-docker#spacemacs (it runs clean spacemacs in a docker image with emacs 27.0.5 with several preinstalled language servers). |
4e324b1
to
fe9183e
Compare
I'm an idiot -- had the Ivy layer enabled :) |
One more thing to consider about the execute code actions - at some point it will be split into 3 methods - execute refactoring(e.g. extract local)/execute source action (e. g. rename file)/execute quick fix(e. g. add missing import). |
Given the future actions Can we move executing code actions to
|
That would collide with java layer:
We may use My personal preference is to have execute action to something more ergonomic(I find |
Good point. |
Fine by me -- away from my dev machine, but will move Should I also add a note to the README indicating that |
@cormacc that would be great. By the way while you are at it, would you mind adding a line to CHANGELOG.develop as well? |
lsp-mode had renamed lsp-shutdown-workspace and lsp-restart-workspace. Added bindings for the following newer interactive lsp-mode functions: - lsp-organize-imports - lsp-document-highlight - lsp-lens-show - lsp-lens-hide - lsp-treemacs-symbols Declared new major mode prefixes (a: code actions, x: text/code). Moved execute-code-action binding under new `a` prefix. Also disabled helm-lsp keybindings when ivy layer in use.
fe9183e
to
2dc8c2e
Compare
Moved the execute code action binding and added placeholders for fix, refactor and source. Added a changelog entry -- realised I'd made no entry in relation to my original lsp layer PR some time ago so just created a single entry related to that -- seems redundant to create two entries given there's been no release since, though happy to elaborate if you want? |
@sdwolfz The circleci failures are opaque to me -- does the reference to stable elpa mean I'm using packages that aren't on stable elpa or something? Or that my changes are incompatible with the package versions on stable elpa? |
(defun configuration-layer//stable-elpa-verify-archive ()
"Verify the downloaded stable ELPA repository archive.
Returns non nil if the verification succeeded.
If Spacemacs cannot verify the archive a prompt ask the user if they want to
continue with the stable ELPA repository installation." Looks like there might be something wrong with the downloaded archive... nothing under your control. @syl20bnr has done some changes in that area recently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'll make a quick check, if nothing goes wrong it will be merged in no time.
Thank you for contributing to Spacemacs 💜, I have cherry picked your commit to develop. You can safely remove your branch. |
We now have an initial version of ivy support at https://github.com/emacs-lsp/lsp-ivy in case you are interested. |
Sounds good @yyoncho -- I'm usually using Ivy as helm-projectile-find-file chokes on the main (C) codebase I work on. I'll take a look and probably raise another PR shortly. I've one against the c/c++ layer I'd like to conclude first though -- branch switching for parallel PRs gives me a headache :) |
I noticed these are placeholders. Are there any plans to implement these different kinds of code actions in lsp-mode? Is there some kind of roadmap where they're described? I couldn't find one A month ago, the documentation was updated to say that these are reserved bindings for 'imminent lsp-mode features' (See mention above). |
@NANASHI0X74 these have originally be introduced by yyoncho to support latest lsp-mode features. I am pretty sure that they are finished by now but nobody updated the bindings yet, feel free to open a PR for this. The task includes looking up the proper function in lsp-mode and replacing the place holder bindings in lsp-layer. |
lsp-mode had renamed lsp-shutdown-workspace and lsp-restart-workspace.
Added bindings for the following newer interactive lsp-mode functions:
Declared a new major mode prefix (x: text/code).
Moved execute-code-action binding under new prefix
Tidy-up in preparation for a c-c++ layer update (adding clangd support)