emacs-lsp / lsp-java

lsp-mode :heart: java
https://emacs-lsp.github.io/lsp-java
GNU General Public License v3.0
642 stars 89 forks source link

No way of selecting multiple dependancies in Spring-Initializr under Ivy #335

Open ykhurshid opened 3 years ago

ykhurshid commented 3 years ago

The interface for the spring intializr frontend seems to have only been tested for helm users as there appears to be no way of selecting multiple packages with ivy. I tried using (ivy-call) but this does not work.

yyoncho commented 3 years ago

I am not ivy user, this one claims to fix the issue - https://github.com/emacs-lsp/lsp-java/pull/150

dakra commented 3 years ago

It came up here as well.

Maybe we should document it somewhere, even though it has nothing really to do with lsp-java but with ivy and multi-select in ivy in general.

freedomskyx commented 3 years ago

Active the hydra-ivy(M-o in doom), then use m to mark multiple candidates.

For doom user: I found doom emacs override the original define of hydra-ivy, and the m(mark) disappear from the define of doom module, you can move the original one to the config.el to recover the mark function.

The one in doom.

The one in ivy.

I configure in my config.el as below.

(after! ivy-hydra
(defhydra hydra-ivy (:hint nil :color pink)
  "
^ ^ ^ ^ ^ ^ | ^Call^      ^ ^  | ^Cancel^ | ^Options^ | Action _w_/_s_/_a_: %-14s(ivy-action-name)
^-^-^-^-^-^-+-^-^---------^-^--+-^-^------+-^-^-------+-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------------------
^ ^ _k_ ^ ^ | _f_ollow occ_U_r | _i_nsert | _c_: calling %-5s(if ivy-calling \"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search
_h_ ^+^ _l_ | _d_one      ^ ^  | _o_ops   | _M_: matcher %-5s(ivy--matcher-desc)^^^^^^^^^^^^ _T_runcate: %-11`truncate-lines
^ ^ _j_ ^ ^ | _g_o        ^ ^  | ^ ^      | _<_/_>_: shrink/grow^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _D_efinition of this menu
"
  ;; arrows
  ("h" ivy-beginning-of-buffer)
  ("j" ivy-next-line)
  ("k" ivy-previous-line)
  ("l" ivy-end-of-buffer)
  ;; mark
  ("m" ivy-mark)
  ("u" ivy-unmark)
  ("DEL" ivy-unmark-backward)
  ("t" ivy-toggle-marks)
  ;; actions
  ("o" keyboard-escape-quit :exit t)
  ("r" ivy-dispatching-done :exit t)
  ("C-g" keyboard-escape-quit :exit t)
  ("i" nil)
  ("C-o" nil)
  ("f" ivy-alt-done :exit nil)
  ("C-j" ivy-alt-done :exit nil)
  ("d" ivy-done :exit t)
  ("g" ivy-call)
  ("C-m" ivy-done :exit t)
  ("c" ivy-toggle-calling)
  ("M" ivy-rotate-preferred-builders)
  (">" ivy-minibuffer-grow)
  ("<" ivy-minibuffer-shrink)
  ("w" ivy-prev-action)
  ("s" ivy-next-action)
  ("a" (let ((ivy-read-action-function #'ivy-read-action-by-key))
         (ivy-read-action)))
  ("T" (setq truncate-lines (not truncate-lines)))
  ("C" ivy-toggle-case-fold)
  ("U" ivy-occur :exit t)
  ("D" (ivy-exit-with-action
        (lambda (_) (find-function 'hydra-ivy/body)))
   :exit t))
  )

image