[Emacs] Add Java configuration

This commit is contained in:
Lucien Cartier-Tilet 2023-03-10 15:27:50 +01:00
parent ff6365ba8c
commit 3d3dcc6123
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -1318,6 +1318,20 @@ you considered a floating buffer in the center of your frame?
(min-height . ,ivy-height)))) (min-height . ,ivy-height))))
#+end_src #+end_src
Something that can be missing sometimes in Ivy is the ability to
select multiple entries at once. For instance, when programming in
Java, LPS can offer you to automatically generate the methods ~equals~
and ~hashCode~ based on selected members, but with vanilla Ivy, you can
only select one. Not really useful. ~ivy-hydra~ is a package that offers
a Hydra interface when in Ivy which allows you to select multiple
choices among other things.
#+begin_src emacs-lisp
(use-package ivy-hydra
:requires (ivy hydra)
:after ivy
:straight (:build t))
#+end_src
Finally, lets make ~ivy~ richer: Finally, lets make ~ivy~ richer:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ivy-rich (use-package ivy-rich
@ -6980,6 +6994,21 @@ work with and it has a lot more features than Cask.
:repo "emacs-eask/eask-mode")) :repo "emacs-eask/eask-mode"))
#+end_src #+end_src
**** Java
:PROPERTIES:
:CUSTOM_ID: PackagesConfigurationProgrammingGeneralProgrammingLanguagesJava-7p420oc0rqj0
:END:
Emacs has built-in support for Java, but it still lacks some features.
The main one is being able to replace an IDE, so lets install its LSP
package.
#+begin_src emacs-lisp
(use-package lsp-java
:requires lsp
:straight (:build t)
:after lsp
:hook (java-mode . lsp-deferred))
#+end_src
**** Python **** Python
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: Packages-Configuration-Programming-languages-General-Programming-Languages-Python-7mwd2yq0z6j0 :CUSTOM_ID: Packages-Configuration-Programming-languages-General-Programming-Languages-Python-7mwd2yq0z6j0