diff options
author | Amin Bandali <bandali@gnu.org> | 2018-10-31 11:54:53 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2018-10-31 11:54:53 -0400 |
commit | d3ce35806feebe6094dd922fab6ac39a3b236caf (patch) | |
tree | e9bf49a7cb1c3b5a225a6d749e564c2f1b11370e | |
parent | a4a4b14a5270ab0ae3917a385055a5a5360ce683 (diff) | |
download | configs-d3ce35806feebe6094dd922fab6ac39a3b236caf.tar.gz configs-d3ce35806feebe6094dd922fab6ac39a3b236caf.tar.xz configs-d3ce35806feebe6094dd922fab6ac39a3b236caf.zip |
[emacs] assimilate meghanada and deps (for Java)
also briefly tried lsp-java but meghanada seems to be more stable atm
Diffstat (limited to '')
-rw-r--r-- | .gitmodules | 6 | ||||
-rw-r--r-- | init.org | 64 | ||||
m--------- | lib/meghanada | 0 | ||||
m--------- | lib/yasnippet | 0 |
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 @@ -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 |