;;; lang/scala/config.el -*- lexical-binding: t; -*-

(def-package! scala-mode
  :mode "\\.s\\(cala\\|bt\\)$"
  :config
  (setq scala-indent:align-parameters t))


(def-package! sbt-mode :after scala-mode)


(def-package! ensime
  :after scala-mode
  :commands (ensime ensime-mode ensime-scala-mode-hook)
  :config
  (set! :company-backend 'scala-mode '(ensime-company company-yasnippet))

  (setq ensime-startup-snapshot-notification nil
        ensime-startup-notification nil
        ensime-eldoc-hints t
        ;; let DOOM handle company setup
        ensime-completion-style nil)

  (add-hook 'scala-mode-hook #'ensime-mode)
  (add-hook 'ensime-mode-hook #'eldoc-mode)

  ;; Fix void-variable imenu-auto-rescan error caused by `ensime--setup-imenu'
  ;; trying to make imenu variables buffer local before imenu is loaded.
  (require 'imenu))


;;; lang/scala/config.el -*- lexical-binding: t; -*-

(def-package! scala-mode
  :mode "\\.s\\(cala\\|bt\\)$"
  :config
  (setq scala-indent:align-parameters t))


(def-package! sbt-mode :after scala-mode)


(def-package! ensime
  :after scala-mode
  :commands (ensime ensime-mode ensime-scala-mode-hook)
  :config
  (set! :company-backend 'scala-mode '(ensime-company company-yasnippet))

  (setq ensime-startup-snapshot-notification nil
        ensime-startup-notification nil
        ensime-eldoc-hints 'all
        ;; let DOOM handle company setup
        ensime-completion-style nil)

  (add-hook 'scala-mode-hook #'ensime-mode)
  (add-hook 'ensime-mode-hook #'eldoc-mode)

  ;; Fix void-variable imenu-auto-rescan error caused by `ensime--setup-imenu'
  ;; trying to make imenu variables buffer local before imenu is loaded.
  (require 'imenu))


Fix invalid default for ensime-eldoc-hints (now set to 'all)
Fix invalid default for ensime-eldoc-hints (now set to 'all)

See valid values at https://github.com/ensime/ensime-emacs/blob/f1ca2bd6de9b4e7eabe198ada75196183a1862c0/ensime-vars.el#L51
Alternatively, could be set to nil (to avoid slowdown for complex project by default).
aminb/.emacs.d,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/.emacs.d,UndeadKernel/emacs_doom,aminb/.emacs.d,hlissner/.emacs.d,hlissner/.emacs.d,aminb/.emacs.d,UndeadKernel/emacs_doom,hlissner/doom-emacs,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/doom-emacs,UndeadKernel/emacs_doom,aminb/.emacs.d,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/.emacs.d,UndeadKernel/emacs_doom,aminb/.emacs.d,aminb/.emacs.d,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/doom-emacs,aminb/.emacs.d,hlissner/doom-emacs,aminb/.emacs.d,UndeadKernel/emacs_doom