update packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; company-capf.el --- company-mode completion-at-point-functions backend -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2013-2019, 2021 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
@@ -148,8 +148,14 @@ so we can't just use the preceding variable instead.")
|
||||
:company-location)))
|
||||
(when f (funcall f arg))))
|
||||
(`annotation
|
||||
(company-capf--annotation arg))
|
||||
(`kind
|
||||
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
|
||||
:annotation-function)))
|
||||
:company-kind)))
|
||||
(when f (funcall f arg))))
|
||||
(`deprecated
|
||||
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
|
||||
:company-deprecated)))
|
||||
(when f (funcall f arg))))
|
||||
(`require-match
|
||||
(plist-get (nthcdr 4 (company--capf-data)) :company-require-match))
|
||||
@@ -158,6 +164,17 @@ so we can't just use the preceding variable instead.")
|
||||
(company--capf-post-completion arg))
|
||||
))
|
||||
|
||||
(defun company-capf--annotation (arg)
|
||||
(let* ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
|
||||
:annotation-function))
|
||||
(annotation (when f (funcall f arg))))
|
||||
(if (and company-format-margin-function
|
||||
(equal annotation " <f>") ; elisp-completion-at-point, pre-icons
|
||||
(plist-get (nthcdr 4 company-capf--current-completion-data)
|
||||
:company-kind))
|
||||
nil
|
||||
annotation)))
|
||||
|
||||
(defun company-capf--candidates (input)
|
||||
(let ((res (company--capf-data)))
|
||||
(company-capf--save-current-data res)
|
||||
|
||||
Reference in New Issue
Block a user