fix: improve and add faces
This commit is contained in:
parent
5b47adb978
commit
cb7ec6ff4c
1 changed files with 17 additions and 3 deletions
|
@ -37,15 +37,25 @@
|
|||
(require 'ghpr-utils)
|
||||
|
||||
(defface ghpr-review-added-line
|
||||
'((t (:background "green" :foreground "black")))
|
||||
'((t (:inherit diff-indicator-added)))
|
||||
"Face for added lines in PR diff."
|
||||
:group 'ghpr)
|
||||
|
||||
(defface ghpr-review-removed-line
|
||||
'((t (:background "red" :foreground "black")))
|
||||
'((t (:inherit diff-indicator-removed)))
|
||||
"Face for removed lines in PR diff."
|
||||
:group 'ghpr)
|
||||
|
||||
(defface ghpr-review-existing-review
|
||||
'((t (:foreground "purple")))
|
||||
"Face for existing review comments."
|
||||
:group 'ghpr)
|
||||
|
||||
(defface ghpr-review-misc-line
|
||||
'((t (:inherit diff-header)))
|
||||
"Face for miscellaneous lines in PR diff."
|
||||
:group 'ghpr)
|
||||
|
||||
(defvar ghpr-review-font-lock-keywords
|
||||
'(("^\\(> \\+[^+]\\)\\(.*\\)$"
|
||||
(0 'ghpr-review-added-line t))
|
||||
|
@ -54,7 +64,11 @@
|
|||
("^\\(> -[^-]\\)\\(.*\\)$"
|
||||
(0 'ghpr-review-removed-line t))
|
||||
("^\\(> -\\)$" ; Handle line with just "> -"
|
||||
(0 'ghpr-review-removed-line t)))
|
||||
(0 'ghpr-review-removed-line t))
|
||||
("^<.*$"
|
||||
(0 'ghpr-review-existing-review t))
|
||||
("^>.*$"
|
||||
(0 'ghpr-review-misc-line)))
|
||||
"Font lock keywords for ghpr-review-mode.")
|
||||
|
||||
(defvar-local ghpr-review-diff-content nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue