[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kind-icon 94ff0ac 13/51: customize interface for mappin
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/kind-icon 94ff0ac 13/51: customize interface for mappings |
|
Date: |
Wed, 17 Nov 2021 15:57:41 -0500 (EST) |
branch: externals/kind-icon
commit 94ff0ac04af7a7815db5e4269aabc68da1a8d5bc
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
customize interface for mappings
---
kind-icon.el | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/kind-icon.el b/kind-icon.el
index ba7d6c8..36484a6 100644
--- a/kind-icon.el
+++ b/kind-icon.el
@@ -89,7 +89,18 @@ color string or a face from which we the :foreground
face-property is taken. The background is automatically computed
to lie between the background color and foreground (see
`kind-icon-blend-frac')."
- :type 'list)
+ :link '(url-link "https://materialdesignicons.com")
+ :type '(repeat
+ (list :tag "Mapping"
+ (symbol :tag "Kind")
+ (string :tag "Short-Text")
+ (plist :tag "Icon/Face options"
+ :inline t
+ :options
+ ((:icon (string :tag "Icon Name"
+ :format "%t: %v"
+ :action kind-icon--preview))
+ (:face (face :tag "Face")))))))
(defcustom kind-icon-blend-frac 0.12
"Fractional blend between foreground and background colors.
@@ -114,6 +125,14 @@ background color."
See `svg-lib-style-compute-default'."
:type 'plist)
+(defun kind-icon--preview (widget event)
+ (goto-char (field-end))
+ (let ((icon (buffer-substring (point) (field-end))))
+ (message "%S looks like: %s" icon
+ (propertize "**" 'display
+ (apply #'svg-lib-icon
+ icon nil kind-icon-default-style)))))
+
(defsubst kind-icon--rgb-blend (rgb1 rgb2 frac)
"Return a fractional blend between two colors RGB1 and RGB2.
Each is a 3 element list. The fractional blend point is the
- [elpa] externals/kind-icon 01d76af 07/51: Make kind-prefix-reset-cache a command, (continued)
- [elpa] externals/kind-icon 01d76af 07/51: Make kind-prefix-reset-cache a command, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon eaeea12 12/51: Doc, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 3b0c9c3 11/51: Renamed kind-icon, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 366232c 36/51: Quiet svg-lib-icon warning, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 9a20879 30/51: Use widget-value in customize preview, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 9098597 33/51: Update kinds to match LSP spec, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon fcfe9ea 14/51: kind-icon-formatted: 3 char-width icon/centered 1 or 2 char text, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 8d6fa99 46/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon b88e809 48/51: kind-formatter -> margin-formatters, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon f6de892 37/51: Remove add-variable-watcher in favor of custom :set, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 94ff0ac 13/51: customize interface for mappings,
ELPA Syncer <=
- [elpa] externals/kind-icon cfa3d73 38/51: Guard against network or other icon retrieval issues (text fallback), ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon ba0f94e 17/51: Re-enable mapping customization preview button, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 0921fe2 35/51: Separate kind-icon--cache, and return ?? when kind missing, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 0d92763 31/51: add kinds constructor, event, reference, typeparameter, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon c69da89 18/51: Updated docs, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon 962c209 20/51: Add custom variable watcher for instant updates, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon c0d50c6 40/51: minor reformat, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon be77196 19/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon ea06e81 47/51: Update README.md, ELPA Syncer, 2021/11/17
- [elpa] externals/kind-icon dce91ac 49/51: Update README.md, ELPA Syncer, 2021/11/17