yasnippet can be integrated into auto-compltion in spacemacs. I want to show snippets at the top of the auto-completions list. Default is at bottom.
foo_______________ |foo -> foo snippet| |foo a| |foobar s| ------------------
foo_______________ |foo a| |foobar s| |foo -> foo snippet| ------------------
... What I tried so far:
auto-complete appears to add ac-source-yasnippet to ac-sources if I tell spacemacs to do so:
(setq-default dotspacemacs-configuration-layers '((auto-completion :variables auto-completion-enable-snippets-in-popup t)))
According to this answer, I can set this manually to change the list order of ac-sources.
(setq ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
However, this doesn't change anything in my setup. I also tried eval-after-load and add-to-list:
(eval-after-load "auto-complete" '(add-to-list 'ac-sources 'ac-source-yasnippet))
If I try to evaluate ac-sources, (
C-h v), nothing happens. The variable seems to be nonexistent.
I could also sort the list by usage, as shown in the docs, but that only works with company. This also doesn't change anything in my setup.
(setq-default dotspacemacs-configuration-layers '((auto-completion :variables auto-completion-enable-sort-by-usage t)))
This question actually was asked here before but the only suggested answer is related to
ac-config-default which I don't use.