Fix #2639: duplicate snippets in completion prompt
This commit is contained in:
parent
5b8b04f0c8
commit
b2919ee5d6
1 changed files with 6 additions and 0 deletions
|
@ -87,6 +87,12 @@
|
||||||
[remap yas-new-snippet] #'+snippets/new
|
[remap yas-new-snippet] #'+snippets/new
|
||||||
[remap yas-visit-snippet-file] #'+snippets/edit)
|
[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 in a daemon session, front-load this expensive work:
|
||||||
(if (daemonp) (yas-reload-all)))
|
(if (daemonp) (yas-reload-all)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue