mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-27 14:23:43 -05:00
Refactor company integration
This commit is contained in:
@@ -14,5 +14,18 @@
|
||||
(company-complete)
|
||||
(call-interactively 'company-select-previous))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/company-complete-common-or-complete-full ()
|
||||
(interactive)
|
||||
(when (company-manual-begin)
|
||||
(if (eq last-command #'company-complete-common-or-cycle)
|
||||
(let ((company-selection-wrap-around t))
|
||||
(call-interactively #'company-complete-selection))
|
||||
(let ((buffer-mod-tick (buffer-chars-modified-tick)))
|
||||
(call-interactively #'company-complete-common)
|
||||
(when (= buffer-mod-tick (buffer-chars-modified-tick))
|
||||
(call-interactively #'company-complete-selection)
|
||||
(call-interactively #'company-complete))))))
|
||||
|
||||
(provide 'defuns-company)
|
||||
;;; defuns-company.el ends here
|
||||
|
@@ -2,7 +2,7 @@
|
||||
;; for ../core-company.el
|
||||
|
||||
;;;###autoload
|
||||
(defmacro add-company-backend! (hook backends)
|
||||
(defmacro define-company-backend! (hook backends)
|
||||
"Register a company backend for a mode."
|
||||
(let ((def-name (intern (format "narf--init-company-%s" hook)))
|
||||
(quoted (eq (car-safe backends) 'quote)))
|
||||
|
Reference in New Issue
Block a user