1
0
Fork 0

fix(emacs): migrate to eglot for java

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-01-18 17:12:23 -05:00
parent 46cf3f4749
commit e68e13829f
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47
2 changed files with 13 additions and 6 deletions

View file

@ -5,9 +5,12 @@
;; short), then it belongs here. ;; short), then it belongs here.
;;; Code: ;;; Code:
(require 'lsp-mode)
(require 'lsp-java)
(require 'git-gutter) (require 'git-gutter)
(require 'elfeed) (require 'elfeed)
(require 'neotree) (require 'neotree)
(require 'copilot)
(defun config-compile () (defun config-compile ()
"(Re)compile the current Emacs configuration." "(Re)compile the current Emacs configuration."
@ -59,13 +62,16 @@
(setq lsp-ui-doc-header t) (setq lsp-ui-doc-header t)
(setq lsp-ui-doc-border (face-foreground 'default)) (setq lsp-ui-doc-border (face-foreground 'default))
(setq lsp-ui-sideline-show-code-actions t) (setq lsp-ui-sideline-show-code-actions t)
(setq lsp-enable-file-watchers nil)
(setq lsp-log-max nil)
(setq lsp-enable-links nil)
(setq lsp-use-plists t)
(custom-set-faces (custom-set-faces
'(lsp-ui-doc-header ((t (:inherit nano-strong :background-color nano-dark-background))))) '(lsp-ui-doc-header ((t (:inherit nano-strong :background-color nano-dark-background)))))
(setq lsp-java-configuration-runtimes (setq read-process-output-max (* 4 1024 1024))
'[(:name "JavaSE-21"
:path "/usr/lib/jvm/java-21-openjdk"
:default t)])
;; Git Gutter ;; Git Gutter
(global-git-gutter-mode +1) (global-git-gutter-mode +1)

View file

@ -68,6 +68,7 @@
;; LSP ;; LSP
(straight-use-package 'lsp-mode) (straight-use-package 'lsp-mode)
(straight-use-package 'lsp-ui) (straight-use-package 'lsp-ui)
(straight-use-package 'eglot)
;; Misc ;; Misc
(straight-use-package 'dash) (straight-use-package 'dash)
@ -96,7 +97,7 @@
(straight-use-package 'slime) (straight-use-package 'slime)
(straight-use-package 'haskell-mode) (straight-use-package 'haskell-mode)
(straight-use-package 'lsp-haskell) (straight-use-package 'lsp-haskell)
(straight-use-package 'lsp-java) (straight-use-package 'eglot-java)
(straight-use-package 'company-coq) (straight-use-package 'company-coq)
(straight-use-package 'proof-general) (straight-use-package 'proof-general)
(straight-use-package '(llvm-mode :type git :host github (straight-use-package '(llvm-mode :type git :host github
@ -147,7 +148,7 @@
(add-hook 'go-mode-hook #'lsp) (add-hook 'go-mode-hook #'lsp)
(add-hook 'tuareg-mode-hook #'lsp) (add-hook 'tuareg-mode-hook #'lsp)
(add-hook 'haskell-mode-hook #'lsp) (add-hook 'haskell-mode-hook #'lsp)
(add-hook 'java-mode-hook #'lsp) (add-hook 'java-mode-hook #'eglot-java-mode)
(add-hook 'emacs-lisp-mode-hook #'paredit-mode) (add-hook 'emacs-lisp-mode-hook #'paredit-mode)
(add-hook 'scheme-mode-hook #'paredit-mode) (add-hook 'scheme-mode-hook #'paredit-mode)