reddit / emacs

Company-mode suggests snippets when I type a colon - how to change?

revokon · 2022-08-26 02:32
I have Doom Emacs set up with company-mode, yasnippet, and lsp-mode for C++ development. So far everything is going great, except that whenever I insert a colon character ":", the popup suggesting snippets shows up. This is rather frustrating, since if I type something like `case foo:<RET>` I accidentally insert a snippet. Is there a way to configure company-mode so that company-yasnippet does not activate when I type specific characters?
thiscarhasfourtires · 2022-08-26 05:37
Do `(setq company-insertion-on-trigger nil)` to completely disable auto insertion. Edit the variable `company-insertion-triggers` if you wish to customize precisely which characters should trigger an insertion.