fix(completion/copilot): ignore buffers which name start with *temp*

This commit is contained in:
2024-02-23 23:35:55 +00:00
parent cd19c5e5f5
commit a1ce447387

View File

@@ -36,13 +36,15 @@
:preface
(defun siren-copilot-disable-predicate ()
(when buffer-file-name
(if buffer-file-name
(let* ((full buffer-file-name)
(base (file-name-nondirectory full))
(dir (file-name-directory full)))
(or (string-prefix-p ".env" base)
(string-match-p "\/\.ansible\/tmp\/ansible-local-.+$" dir)
(string-suffix-p ".kube/config" full)))))
(string-suffix-p ".kube/config" full)))
(let ((name (buffer-name)))
(or (string-prefix-p "*temp*" name)))))
(defun siren-copilot-dwim ()
"Trigger or accept completion."