I recently started using lsp-java and one of the packages it suggests is helm. The suggested changes to the .emacs file to do this is:
(use-package helm-lsp) (use-package helm :config (helm-mode))
This obviously works to start helm mode.
This issue I have is if I open another buffer in another mode (say shell in shell-mode) it continues to use helm which I really don't like.
I have tried adding the helm-lsp and helm mode initializing into a function which in turn is loaded via a java-mode-hook:
(defun init-lsp-java-stuff () (interactive) ... (use-package helm-lsp) (use-package helm :config (helm-mode)) ... ) ... (add-hook 'java-mode-hook 'init-lsp-java-stuff)
This works if I never enter java mode, but still after entering java mode all my other buffers have helm loaded.
What I want is for helm to ONLY be loaded for java-mode buffers, and NOT be loaded for buffers in any other mode.