summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitmodules6
-rw-r--r--init.org64
m---------lib/meghanada0
m---------lib/yasnippet0
4 files changed, 70 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index 1a256b3..b31573a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -149,6 +149,9 @@
[submodule "markdown-mode"]
path = lib/markdown-mode
url = git@github.com:jrblevin/markdown-mode.git
+[submodule "meghanada"]
+ path = lib/meghanada
+ url = git@github.com:mopemope/meghanada-emacs.git
[submodule "memoize"]
path = lib/memoize
url = git@github.com:skeeto/emacs-memoize.git
@@ -264,3 +267,6 @@
[submodule "yaml-mode"]
path = lib/yaml-mode
url = git@github.com:yoshiki/yaml-mode.git
+[submodule "yasnippet"]
+ path = lib/yasnippet
+ url = git@github.com:joaotavora/yasnippet.git
diff --git a/init.org b/init.org
index 790c967..6d0b40f 100644
--- a/init.org
+++ b/init.org
@@ -1378,6 +1378,70 @@ instead.
:mode "\\.nix\\'")
#+end_src
+** Java
+
+*** meghanada
+
+#+begin_src emacs-lisp :tangle yes
+(use-package meghanada
+ :bind
+ (:map meghanada-mode-map
+ (("C-M-o" . meghanada-optimize-import)
+ ("C-M-t" . meghanada-import-all)))
+ :hook (java-mode . meghanada-mode))
+#+end_src
+
+*** lsp-java
+
+#+begin_src emacs-lisp :tangle no
+(use-package treemacs)
+
+(use-package yasnippet
+ :config
+ ;; (yas-global-mode)
+ )
+
+(use-package lsp-mode
+ :init (setq lsp-eldoc-render-all nil
+ lsp-highlight-symbol-at-point nil)
+ )
+
+(use-package hydra)
+
+(use-package company-lsp
+ :after company
+ :config
+ (setq company-lsp-cache-candidates t
+ company-lsp-async t))
+
+(use-package lsp-ui
+ :config
+ (setq lsp-ui-sideline-update-mode 'point))
+
+(use-package lsp-java
+ :config
+ (add-hook 'java-mode-hook
+ (lambda ()
+ (setq-local company-backends (list 'company-lsp))))
+
+ (add-hook 'java-mode-hook 'lsp-java-enable)
+ (add-hook 'java-mode-hook 'flycheck-mode)
+ (add-hook 'java-mode-hook 'company-mode)
+ (add-hook 'java-mode-hook 'lsp-ui-mode))
+
+(use-package dap-mode
+ :after lsp-mode
+ :config
+ (dap-mode t)
+ (dap-ui-mode t))
+
+(use-package dap-java
+ :after (lsp-java))
+
+(use-package lsp-java-treemacs
+ :after (treemacs))
+#+end_src
+
* Emacs Enhancements
** [[https://github.com/justbur/emacs-which-key][which-key]]
diff --git a/lib/meghanada b/lib/meghanada
new file mode 160000
+Subproject 0b36871f1537921e1819a84f99f3fb957183175
diff --git a/lib/yasnippet b/lib/yasnippet
new file mode 160000
+Subproject 1d96da2e08664c31ff7f6f7441da1f4fa5680b1