   (add-hook 'c-mode-hook #'lsp-deferred)
   (add-hook 'c++-mode-hook #'lsp-deferred)
   (add-hook 'python-mode-hook #'lsp-deferred)
+  (add-hook 'java-mode-hook #'lsp-deferred)
   (add-hook 'enh-ruby-mode-hook #'(lambda ()
                                     (if (duncan/ruby-solargraph-project-p)
                                         (let ((lsp-solargraph-use-bundler t)) (lsp-deferred)))))


(use-package lsp-java
  :after lsp
  :config (add-hook 'java-mode-hook 'lsp))

(use-package dap-mode
  :after lsp-mode
  :config
  (dap-mode t)
  (dap-ui-mode t))

(use-package dap-java
  :defer t


(use-package lsp-ui
  :defer t
  :custom
  (lsp-ui-doc-enable t)
  (lsp-ui-peek-enable t)
  (lsp-ui-sideline-enable t)
  (lsp-ui-imenu-enable t)
  (lsp-ui-flycheck-enable t)
  :after flycheck)

(use-package lsp-treemacs
