update packages

This commit is contained in:
2022-01-03 21:18:11 +01:00
parent a3155953d6
commit 4c740d6f8d
89 changed files with 5691 additions and 1653 deletions

View File

@@ -35,6 +35,9 @@
(declare-function yas--template-expand-env "yasnippet")
(declare-function yas--warning "yasnippet")
(declare-function yas-minor-mode "yasnippet")
(declare-function yas--require-template-specific-condition-p "yasnippet")
(declare-function yas--template-can-expand-p "yasnippet")
(declare-function yas--template-condition "yasnippet")
(defvar company-yasnippet-annotation-fn
(lambda (name)
@@ -86,6 +89,7 @@ It has to accept one argument: the snippet's name.")
(cl-mapcan
(lambda (table)
(let ((keyhash (yas--table-hash table))
(requirement (yas--require-template-specific-condition-p))
res)
(when keyhash
(maphash
@@ -94,13 +98,15 @@ It has to accept one argument: the snippet's name.")
(string-prefix-p key-prefix key))
(maphash
(lambda (name template)
(push
(propertize key
'yas-annotation name
'yas-template template
'yas-prefix-offset (- (length key-prefix)
(length prefix)))
res))
(when (yas--template-can-expand-p
(yas--template-condition template) requirement)
(push
(propertize key
'yas-annotation name
'yas-template template
'yas-prefix-offset (- (length key-prefix)
(length prefix)))
res)))
value)))
keyhash))
res))
@@ -165,6 +171,7 @@ shadow backends that come after it. Recommended usages:
(candidates (company-yasnippet--candidates arg))
(doc-buffer (company-yasnippet--doc arg))
(no-cache t)
(kind 'snippet)
(post-completion
(let ((template (get-text-property 0 'yas-template arg))
(prefix-offset (get-text-property 0 'yas-prefix-offset arg)))