Now that we are loading package autoloads files (as part of the generated doom-package-autoload-file when running make autoloads), many :commands properties are redundant. In fact, many def-package! blocks are redundant. In some cases, we can do without a config.el file entirely, and can move into the autoloads file or rely entirely on package autoloads. Also, many settings have been moved in their module's autoloads files, which makes them available ASAP; their use no longer depends on module load order. This gained me a modest ~10% boost in startup speed.
24 lines
762 B
EmacsLisp
24 lines
762 B
EmacsLisp
;;; lang/scala/config.el -*- lexical-binding: t; -*-
|
|
|
|
(after! scala-mode
|
|
(setq scala-indent:align-parameters t)
|
|
(add-to-list 'dtrt-indent-hook-mapping-list '(scala-mode c/c++/java scala-indent:step)))
|
|
|
|
|
|
(after! ensime
|
|
(setq ensime-startup-snapshot-notification nil
|
|
ensime-startup-notification nil
|
|
ensime-eldoc-hints 'all
|
|
;; let DOOM handle company setup
|
|
ensime-completion-style nil)
|
|
|
|
(set! :company-backend 'scala-mode '(ensime-company company-yasnippet))
|
|
|
|
;; 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))
|
|
|
|
|
|
(def-package! sbt-mode
|
|
:after scala-mode
|
|
:config (set! :repl 'scala-mode #'run-scala))
|