(use-package org-notmuch
:after (:any org notmuch))
-(use-package orgalist)
+(use-package orgalist
+ :hook (message-mode . orgalist-mode))
#+end_src
**** asynchronous tangle
:defer 5
:bind
(:map company-active-map
- ([tab] . company-complete-common-or-cycle))
+ ([tab] . company-complete-common-or-cycle)
+ ([escape] . company-abort))
:custom
(company-idle-delay 0.3)
(company-minimum-prefix-length 1)
: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]]
(use-package highlight-indent-guides
:demand t
:hook ((prog-mode . highlight-indent-guides-mode)
- (org-mode . highlight-indent-guides-mode))
+ ;; (org-mode . highlight-indent-guides-mode)
+ )
:config
(setq highlight-indent-guides-character ?\|)
(setq highlight-indent-guides-auto-enabled nil)
#+begin_src emacs-lisp
(use-package pdf-tools
:magic ("%PDF" . pdf-view-mode)
- :config (pdf-tools-install)
+ :config
+ (setq pdf-view-resize-factor 1.05)
+ (pdf-tools-install)
:bind
(:map pdf-view-mode-map
("C-s" . isearch-forward)
("C-r" . isearch-backward)
("j" . pdf-view-next-line-or-next-page)
- ("k" . pdf-view-previous-line-or-previous-page)))
+ ("k" . pdf-view-previous-line-or-previous-page)
+ ("h" . image-backward-hscroll)
+ ("l" . image-forward-hscroll)))
#+end_src
** anzu
#+begin_src emacs-lisp
(defun amin/notmuch ()
"Delete other windows, then launch `notmuch'."
- (interactive)
- (delete-other-windows)
+ (interactive
+ (when (equal current-prefix-arg nil)
+ (delete-other-windows)))
(notmuch))
(use-package notmuch