Skip to content

How to update jdtls automatically? #1366

Answered by yveszoundi
francesco-cadei asked this question in Q&A
Discussion options

You must be logged in to vote

Unless using an auxiliary package (e.g., eglot-java), you'll need to write custom code.

  • In eglot-java the initial jdtls installation is performed automatically on your behalf
  • If you then need/want to upgrade jdtls, you can call a function that will upgrade it for you

You could take inspiration from eglot-java and wrap eglot-ensure with your own function for java-mode (e.g., francesco/java-eglot-ensure). You probably don't want to check all the time for new versions in the context of "automatic updates" (performance, your ip address will also likely be blocked for abuse...).

(use-package eglot
  :config
  (add-to-list 'eglot-server-programs
	       '(java-mode . ("~/jdt-language-server")…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@francesco-cadei
Comment options

Answer selected by francesco-cadei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants