4

Say, I have been using Spacemacs for a while now, and was looking at Spacevim a bit. One nice feature of Spacevim is that it's autocompletion feature includes both the words for completion as well as snippets. So if I am in latex mode, the completion dropdown will display both potential completion text as well as snippet text.

I have include a picture of this below.

enter image description here

I was wondering if there is a feature like this in Spacemacs or emacs? I know that Spacemacs seems to use company.el for completion, but was not sure if I could switch to a different completion package and if that would solve the problem? Would something from helm be able to provide this?

krishnab
  • 519
  • 5
  • 17

1 Answers1

2

The answer is in the spacemacs docs for the auto-completion layer:

(setq auto-completion-enable-snippets-in-popup t)

You can read those docs inline with SPC h l auto-completion RET (and you can jump to that node using SPC s j show snippets RET).

The text in those docs is suggesting that rather than putting that setq above in your dotspacemacs/user-config, you can have something like this in the dotspacemacs-configuration-layers section of your .spacemacs file (SPC f e d to view it), which I guess is more spacemacs-y:

'(javascript
  haskell
  ...
  ivy
  (auto-completion
   :variables
   auto-completion-enable-snippets-in-popup t)
  ;; better-defaults
  emacs-lisp
  ...
Croad Langshan
  • 3,192
  • 14
  • 42