From 3d3dcc6123da3d1869e0b41bb5f8f78429a67712 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Fri, 10 Mar 2023 15:27:50 +0100 Subject: [PATCH] [Emacs] Add Java configuration --- org/config/emacs.org | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/org/config/emacs.org b/org/config/emacs.org index 78114c3..d2473c7 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -1318,6 +1318,20 @@ you considered a floating buffer in the center of your frame? (min-height . ,ivy-height)))) #+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, let’s make ~ivy~ richer: #+begin_src emacs-lisp (use-package ivy-rich @@ -6980,6 +6994,21 @@ work with and it has a lot more features than Cask. :repo "emacs-eask/eask-mode")) #+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 let’s 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 :PROPERTIES: :CUSTOM_ID: Packages-Configuration-Programming-languages-General-Programming-Languages-Python-7mwd2yq0z6j0