Skip to content

Instantly share code, notes, and snippets.

@matfournier
Last active April 5, 2020 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matfournier/bceab69da556ab0c69854ac54721edea to your computer and use it in GitHub Desktop.
Save matfournier/bceab69da556ab0c69854ac54721edea to your computer and use it in GitHub Desktop.
scaladoc in doom emacs

First pull latest develop and do a bin/doom update

I did this wrong the first time, but the doom-emacs author is here to help. See his solution below but also add this one line

(setq-hook! 'scala-mode-hook +lsp-company-backend 'company-capf)

how to use

type /** above a class or whatever which will autocomplete a blank template, then use M-x and type company-capf you should get a popup for scaladoc completion. I have to be in insert (not visual) mode for this to work.

@hlissner
Copy link

hlissner commented Apr 3, 2020

I would highly recommend not modifying your ~/.emacs.d by hand. Those options can be reversed by adding a block like this to your ~/.doom.d/config.el:

(after! lsp-mode
  (setq lsp-enable-folding t
        lsp-enable-file-watchers t
        lsp-enable-text-document-color t
        lsp-enable-semantic-highlighting t
        lsp-enable-indentation t
        lsp-enable-on-type-formatting t))

Also, I'm sure only one of these settings will enable scaladoc. Enabling them all is likely overkill!

Hope that helps!

@matfournier
Copy link
Author

Definitely helps! I'll go update my files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment