Add ability to customize selection face

This commit is contained in:
daedsidog 2024-04-12 19:29:27 +03:00
parent 839d7e0b63
commit 329a2776b3

View file

@ -47,6 +47,11 @@
'gptel-remove-context-at-point-from-context-buffer)
map))
(defcustom gptel-contexter-selection-face 'secondary-selection
"Face to use to highlight selected context in the buffers."
:group 'gptel
:type 'symbol)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ------------------------------ FUNCTIONS ------------------------------- ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -54,7 +59,7 @@
(defun gptel--highlight-region (start end)
"Highlight the region from START to END."
(let ((overlay (make-overlay start end)))
(overlay-put overlay 'face 'secondary-selection)
(overlay-put overlay 'face gptel-contexter-selection-face)
(overlay-put overlay 'contexter t)))
(defun gptel--unhighlight-region (start end)