[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc |
Date: |
Sun, 29 Aug 2021 11:01:57 -0400 (EDT) |
branch: elpa/dart-mode
commit eea1000bc414bd95e0004fb9d6124857bdef2e38
Author: Natalie Weizenbaum <nex342@gmail.com>
Commit: Natalie Weizenbaum <nex342@gmail.com>
Highlight hover dartdoc
---
dart-mode.el | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dart-mode.el b/dart-mode.el
index 0e4e70f..6de744e 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -1026,7 +1026,7 @@ reported to CALLBACK."
(when dartdoc) (insert ?\n))
(when dartdoc
(when (or element-description parameter) (insert ?\n))
- (insert dartdoc))
+ (insert (dart--highlight-dartdoc dartdoc)))
(message "%s" (buffer-string))))))))))
(defconst dart--highlight-keyword-re
@@ -1088,6 +1088,22 @@ reported to CALLBACK."
(and (looking-at (concat "\\(" dart--identifier-re "\\|[<>]\\)*"))
(eq (char-after (match-end 0)) ?\()))))
+(defun dart--highlight-dartdoc (dartdoc)
+ "Returns a higlighted copy of DARTDOC."
+ (with-temp-buffer
+ (insert dartdoc)
+
+ ;; Cut off long dartdocs so that the full signature is always visible.
+ (goto-line 11)
+ (delete-region (- (point) 1) (point-max))
+
+ (goto-char (point-min))
+
+ (while (re-search-forward "\\[.*?\\]" nil t)
+ (put-text-property (match-beginning 0) (match-end 0)
+ 'face 'font-lock-reference-face))
+
+ (buffer-string)))
;;; Formatting
- [nongnu] elpa/dart-mode 1b01681 065/192: Merge pull request #14 from hterkelsen/issue13, (continued)
- [nongnu] elpa/dart-mode 1b01681 065/192: Merge pull request #14 from hterkelsen/issue13, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 351db28 072/192: Lexically scope the library., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1ccf8a0 073/192: Better handling and of analysis server messages., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a4d7a3c 075/192: Declare compatibility with flycheck 0.23., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1b75622 079/192: Only mention marmalade in the README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e338148 078/192: Get rid of busted flymake and formatter support., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 05fbd30 081/192: Merge pull request #24 from phst/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode bd08208 082/192: Switch completely to cl-lib (#33), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1f65c88 083/192: Add LIMIT argument for looking-back (#34), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1c9da5a 087/192: Explicitly load compile.el so that the compilation-error-regexp-* variables are defined (#41), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc,
ELPA Syncer <=
- [nongnu] elpa/dart-mode 907cba5 095/192: Indicate deprecated hovers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 8e09b68 120/192: Exclusively use cl-lib to avoid byte-compilation inconsistencies, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1249417 108/192: Better handle zero-argument functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 0277dad 107/192: Include parameter documentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 73d0ebc 135/192: Merge branch 'refactor-tests', ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 4feac34 123/192: Make sure to provide the full buffer in dart-add-analysis-overlay, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e01234a 113/192: Use funcall rather than apply where appropriate, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode eba375b 112/192: Parse JSON arrays as lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 905ce53 117/192: Fix a bunch of byte-compilation warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 25a0b8a 128/192: Add tests for dart-format, ELPA Syncer, 2021/08/29