erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
624 stars 136 forks source link

Consider adding a reference to a hydra-styled menu #372

Open onno-vos-dev opened 4 years ago

onno-vos-dev commented 4 years ago

Describe the solution you'd like Many users of erlang_ls are likely to come from EDTS and many of the key-bindings used by ex-EDTS users are likely to be in their muscle-memory. I've used hydra for other things before to add a menu that allows the users to quickly navigate to relevant functionality.

I'd like to poll to see if there'd be an interest in adding such thing to the README.

Possible initial suggestion

(defhydra hydra-erlang-ls (:hint nil)
  "
 Erlang LS Helper menu
------------------------------------------------------------------
 [_i_] Show functions sidebar
 [_f_] Jump to function
 [_m_] Find module
 [_a_] Find references
 [_r_] Restart workspace
 [_q_] Quit"
  ("i" lsp-ui-imenu)
  ("f" helm-imenu)
  ("m" helm-lsp-workspace-symbol :exit t)
  ("a" lsp-find-references)
  ("r" lsp-restart-workspace)
  ("q" nil))

(global-set-key (kbd "C-c d") 'hydra-erlang-ls/body)
robertoaloi commented 4 years ago

Hi! I haven't used hydra myself, so I will have to use check it out first. Generally speaking, it sounds like a good approach and it would give users an overview of the possibilities available. Generally speaking, I would like to move editor-specific configurations away from the README to their own pages, be them part of the wiki or other kind of documentation. For now, feel free to add to add this to the README itself, we can move it later.