mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix #2639: duplicate snippets in completion prompt
This commit is contained in:
@ -87,6 +87,12 @@
|
||||
[remap yas-new-snippet] #'+snippets/new
|
||||
[remap yas-visit-snippet-file] #'+snippets/edit)
|
||||
|
||||
;; REVIEW Fix #2639: For some reason `yas--all-templates' returns duplicates
|
||||
;; of some templates. Until I figure out the real cause this fixes it.
|
||||
(defadvice! +snippets--remove-duplicates-a (templates)
|
||||
:filter-return #'yas--all-templates
|
||||
(cl-delete-duplicates templates :test #'equal))
|
||||
|
||||
;; If in a daemon session, front-load this expensive work:
|
||||
(if (daemonp) (yas-reload-all)))
|
||||
|
||||
|
Reference in New Issue
Block a user