fix(lsp-java): use proper feature name in config

This commit is contained in:
Kiana Sheibani 2024-08-26 19:36:28 -04:00
parent 9808c7e3ff
commit 869527ec5b
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -4120,7 +4120,7 @@ I prefer 2-space indentation in all circumstances. Unfortunately, Emacs's indent
#+call: confpkg("Mode: Java") #+call: confpkg("Mode: Java")
The =lsp-java= package provides LSP support using the standard language server, the Eclipse-based ~jdtls~. Unfortunately, this package isn't designed for Nix, so it fails to find the server script in our Nix store. We need to do a bit of legwork to patch in this support, as well as some extra considerations, such as per-project config directories. The =lsp-java= package provides LSP support using the standard Java language server, the Eclipse-based ~jdtls~. Unfortunately, this package isn't designed for Nix, so it fails to find the server script in our Nix store. We need to do a bit of legwork to patch in this support, as well as some related considerations, such as per-project config directories.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun +lsp-java-server-store-path () (defun +lsp-java-server-store-path ()
@ -4131,7 +4131,7 @@ The =lsp-java= package provides LSP support using the standard language server,
(executable-find lsp-java-jdt-ls-command) (executable-find lsp-java-jdt-ls-command)
(user-error "Could not find Java language server")))) (user-error "Could not find Java language server"))))
(after! java-mode (after! lsp-java
(setq lsp-java-jdt-ls-prefer-native-command t)) (setq lsp-java-jdt-ls-prefer-native-command t))
(add-hook! java-mode (add-hook! java-mode
(setq-local lsp-java-server-install-dir (setq-local lsp-java-server-install-dir