Skip to content

Instantly share code, notes, and snippets.

@ur4ltz
Forked from sebastiencs/company-yasnippet.el
Created June 25, 2021 16:04
Show Gist options
  • Save ur4ltz/18d3e54493551e26008eba3f7973832f to your computer and use it in GitHub Desktop.
Save ur4ltz/18d3e54493551e26008eba3f7973832f to your computer and use it in GitHub Desktop.
company with yasnippet
;; With this code, yasnippet will expand the snippet if company didn't complete the word
;; replace company-complete-common with company-complete if you're using it
(advice-add 'company-complete-common :before (lambda () (setq my-company-point (point))))
(advice-add 'company-complete-common :after (lambda ()
(when (equal my-company-point (point))
(yas-expand))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment