[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult-hoogle c6063a7244 06/21: Customization option t
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult-hoogle c6063a7244 06/21: Customization option to show less in the candidate line. |
Date: |
Sun, 4 Feb 2024 12:57:53 -0500 (EST) |
branch: externals/consult-hoogle
commit c6063a724446055c6361987bff775c5ff0ab050b
Author: Rahguzar <aikrahguzar@gmail.com>
Commit: Rahguzar <aikrahguzar@gmail.com>
Customization option to show less in the candidate line.
---
consult-hoogle.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/consult-hoogle.el b/consult-hoogle.el
index ab71231b7b..7eab6af3b3 100644
--- a/consult-hoogle.el
+++ b/consult-hoogle.el
@@ -24,7 +24,9 @@
(require 'shr)
;;;; Variables
-(defcustom consult-hoogle-args "hoogle search --jsonl -q --count=250" "The
hoogle invocation used to get results." :type 'string :group 'consult)
+(defcustom consult-hoogle-args "hoogle search --jsonl -q --count=100" "The
hoogle invocation used to get results." :type 'string :group 'consult)
+
+(defcustom consult-hoogle-show-module-and-package t "Whether to show the
package and module in the candidate line." :type 'boolean :group 'consult)
(defvar consult-hoogle--history nil "Variable to store history for hoogle
searches.")
@@ -32,8 +34,8 @@
(define-key map (kbd "M-i")
#'consult-hoogle-browse-item)
(define-key map (kbd "M-j")
#'consult-hoogle-browse-package)
(define-key map (kbd "M-m")
#'consult-hoogle-browse-module)
- (define-key map (kbd "M-<up>")
#'consult-hoogle-scroll-docs-up)
- (define-key map (kbd "M-<down>")
#'consult-hoogle-scroll-docs-down)
+ (define-key map (kbd "M-<up>")
#'consult-hoogle-scroll-docs-down)
+ (define-key map (kbd "M-<down>")
#'consult-hoogle-scroll-docs-up)
map))
;;;; Constructing the string to display
@@ -73,12 +75,12 @@ it we need."
(buffer-substring (point-min) (point-max))))
(defun consult-hoogle--format-value (alist) "Construct the disaply string from
ALIST for a value."
- (let* ((item (map-elt alist 'item))
+ (let* ((item (consult-hoogle--fontify (map-elt alist 'item)))
(module (map-nested-elt alist '(module name) ""))
(package (map-nested-elt alist '(package name) "")))
- (concat (consult-hoogle--fontify item)
- (propertize " from " 'face 'font-lock-comment-face)
(propertize module 'face 'haskell-keyword-face)
- (propertize " in " 'face 'font-lock-comment-face) (propertize
package 'face 'haskell-quasi-quote-face))))
+ (if (not consult-hoogle-show-module-and-package) item
+ (concat item (propertize " from " 'face
'font-lock-comment-face) (propertize module 'face 'haskell-keyword-face)
+ (propertize " in " 'face 'font-lock-comment-face)
(propertize package 'face 'haskell-quasi-quote-face)))))
(defun consult-hoogle--format-module (alist) "Construct the disaply string
from ALIST for a module."
(let ((name (cadr (split-string (map-elt alist 'item) nil t " +")))
- [elpa] branch externals/consult-hoogle created (now cc4ed71724), ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle 8d6cbeacc2 05/21: Screenshots, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle ecee46f2f8 03/21: Use font locking from haskell-mode., ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle c6063a7244 06/21: Customization option to show less in the candidate line.,
ELPA Syncer <=
- [elpa] externals/consult-hoogle 9754f8c582 01/21: Beginning, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle f3ef0d9624 07/21: Fix fontification, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle 3f6a93a7ab 08/21: squash! Fix fontification, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle f78db233c0 18/21: New consult builder format, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle 80a6f2af4d 19/21: Format conventionally, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle cc4ed71724 21/21: Use list of command name and args, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle 7e292b8483 04/21: Docs scrolling commands, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle 04940b0e62 02/21: Quote fix, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle e1586d0190 09/21: Kill the fontification buffer after exit, ELPA Syncer, 2024/02/04
- [elpa] externals/consult-hoogle 621204e982 10/21: Refactor, ELPA Syncer, 2024/02/04