Compare commits
No commits in common. "c82bf5510298bcc6694fc2fa0154d375d1df66fa" and "293281eacab3fb73c7bbf5670b9e3ba971f36ed0" have entirely different histories.
c82bf55102
...
293281eaca
@ -52,28 +52,20 @@
|
|||||||
`(html-web-mode . ,(eglot-alternatives
|
`(html-web-mode . ,(eglot-alternatives
|
||||||
'(("vscode-html-language-server" "--stdio")
|
'(("vscode-html-language-server" "--stdio")
|
||||||
("html-languageserver" "--stdio")))))
|
("html-languageserver" "--stdio")))))
|
||||||
(defvar eglot-java-java-agent nil
|
|
||||||
"Java agent JVM arg for eglot JDTLS.")
|
|
||||||
;; Custom eglot java server for deeper customization
|
;; Custom eglot java server for deeper customization
|
||||||
(defclass eglot-java-server (eglot-lsp-server) ()
|
(defclass eglot-java-server (eglot-lsp-server) ()
|
||||||
:documentation "Eglot integration with JDTLS.")
|
:documentation "Eglot integration with JDTLS.")
|
||||||
(defun eglot-java-contact (&optional interactive)
|
(add-to-list 'eglot-server-programs
|
||||||
`(eglot-java-server .
|
'(java-mode .
|
||||||
("jdtls" ,(if (s-blank? eglot-java-java-agent)
|
(eglot-java-server .
|
||||||
""
|
("jdtls" :initializationOptions
|
||||||
(format "--jvm-arg=-javaagent:%s" eglot-java-java-agent))
|
(:extendedClientCapabilities
|
||||||
:initializationOptions
|
(:classFileContentsSupport t)
|
||||||
(:extendedClientCapabilities (:classFileContentsSupport t)
|
:runtimes [(:name "JavaSE-11"
|
||||||
:settings
|
|
||||||
(:java
|
|
||||||
(:home "/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home"
|
|
||||||
:configuration
|
|
||||||
(:runtimes [(:name "JavaSE-11"
|
|
||||||
:path "/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk")
|
:path "/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk")
|
||||||
(:name "JavaSE-17"
|
(:name "JavaSE-17"
|
||||||
:path "/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk"
|
:path "/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk"
|
||||||
:default t)])))))))
|
:default t)])))))
|
||||||
(add-to-list 'eglot-server-programs '(java-mode . eglot-java-contact))
|
|
||||||
;; Fix JDTLS's weird handling of workspaceEdit
|
;; Fix JDTLS's weird handling of workspaceEdit
|
||||||
(cl-defmethod eglot-execute-command
|
(cl-defmethod eglot-execute-command
|
||||||
((_server eglot-java-server) (_cmd (eql java.apply.workspaceEdit)) arguments)
|
((_server eglot-java-server) (_cmd (eql java.apply.workspaceEdit)) arguments)
|
||||||
|
@ -30,18 +30,23 @@
|
|||||||
deferred:timeout
|
deferred:timeout
|
||||||
deferred:process))
|
deferred:process))
|
||||||
|
|
||||||
(use-package s)
|
(use-package s
|
||||||
|
:defer t)
|
||||||
|
|
||||||
(use-package dash)
|
(use-package dash
|
||||||
|
:defer t)
|
||||||
|
|
||||||
(use-package dash-functional)
|
(use-package dash-functional
|
||||||
|
:defer t)
|
||||||
|
|
||||||
(use-package f)
|
(use-package f
|
||||||
|
:defer t)
|
||||||
|
|
||||||
(use-package request
|
(use-package request
|
||||||
:commands request)
|
:commands request)
|
||||||
|
|
||||||
(use-package ht)
|
(use-package ht
|
||||||
|
:defer t)
|
||||||
|
|
||||||
;; Elisp utilities
|
;; Elisp utilities
|
||||||
(defun make-process-sentinel (success err)
|
(defun make-process-sentinel (success err)
|
||||||
|
Loading…
Reference in New Issue
Block a user