/yasnippet-capf-elken

Completion-At-Point Extension for YASnippet

Primary LanguageEmacs LispGNU General Public License v3.0GPL-3.0

yasnippet-capf

A simple capf (Completion-At-Point Function) for completing yasnippet snippets.

Install

Manual

Download somewhere and add to your load-path and add yasnippet-capf to completion-at-point-functions.

Doom

Add the following lines to your relevant files

packages.el

(package! yasnippet-capf
  :recipe (:host github :repo "elken/yasnippet-capf"))

config.el

(use-package! yasnippet-capf
  :after cape
  :config
  (add-to-list 'completion-at-point-functions #'yasnippet-capf))

Configuration

The following options are available to customise:

yasnippet-capf-lookup-by

Which lookup method to use to query snippets. By default, this uses the key to query against but if preferred you can also set this to use the name of the snippet.

(setq yasnippet-capf-lookup-by 'name) ;; Prefer the name of the snippet instead