Add ability to customize selection face
This commit is contained in:
parent
839d7e0b63
commit
329a2776b3
1 changed files with 6 additions and 1 deletions
|
@ -47,6 +47,11 @@
|
||||||
'gptel-remove-context-at-point-from-context-buffer)
|
'gptel-remove-context-at-point-from-context-buffer)
|
||||||
map))
|
map))
|
||||||
|
|
||||||
|
(defcustom gptel-contexter-selection-face 'secondary-selection
|
||||||
|
"Face to use to highlight selected context in the buffers."
|
||||||
|
:group 'gptel
|
||||||
|
:type 'symbol)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; ------------------------------ FUNCTIONS ------------------------------- ;;;
|
;;; ------------------------------ FUNCTIONS ------------------------------- ;;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -54,7 +59,7 @@
|
||||||
(defun gptel--highlight-region (start end)
|
(defun gptel--highlight-region (start end)
|
||||||
"Highlight the region from START to END."
|
"Highlight the region from START to END."
|
||||||
(let ((overlay (make-overlay start 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)))
|
(overlay-put overlay 'contexter t)))
|
||||||
|
|
||||||
(defun gptel--unhighlight-region (start end)
|
(defun gptel--unhighlight-region (start end)
|
||||||
|
|
Loading…
Add table
Reference in a new issue