+title: Consult – Key features and some tweaks
Note I am using the default Consult Use-package example
;;(advice-add #'vertico--display-candidates :around #'my-display) | |
;;(advice-add #'vertico--resize-window :around #'no-resize-vertico) | |
;;(defun no-resize-vertico (&rest _)) | |
;; TODO open issues: | |
;; DONE cursor in minibuffer is still shown | |
;; DONE vertico--exhibit/consult--refresh-hook should be hooked into, in order to ensure that resize works | |
;; TODO recursive minibuffers |
;;; -*- lexical-binding: t -*- | |
(require 'subr-x) | |
(defgroup minicomp nil | |
"Minimal completion system." | |
:group 'convenience | |
:prefix "minicomp-") | |
(defface minicomp-group-title |
+title: Consult – Key features and some tweaks
Note I am using the default Consult Use-package example
;; -*- lexical-binding: t -*- | |
;; Completion Overlay in Region FUnction | |
(defun corfu--show (pos lines) | |
(let* ((width (if lines (apply #'max (mapcar #'string-width lines)) 0)) | |
(beg (line-beginning-position)) | |
(col (- pos beg)) | |
(overlays)) | |
(save-excursion | |
(dolist (line lines overlays) |
Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f
, then f
is m
’s continuation. It’s the function that is called with m
’s result to continue execution after m
returns.
If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have
m >>= f >>= g >>= h
then the continuation of m
is f >=> g >=> h
. Likewise, the continuation of m >>= f
is g >=> h
.
/* | |
* Inflate library derived from tinflate by Joergen Ibsen. | |
* The following license applies to tinflate and the derived code. | |
* | |
* Copyright (c) 2003-2019 Joergen Ibsen | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will the authors be held liable for any damages | |
* arising from the use of this software. | |
* |
#!/usr/bin/perl -w | |
use strict; | |
use File::Slurper qw(read_text write_text); | |
my $defs = read_text "runtime/native/event/defs.in"; | |
my $types = ""; | |
my %type = (); | |
while ($defs =~ /CHI_NEWTYPE\((\w+),\s*(\w+)\)/gs) { | |
$types .= "typedef $2 Xy$1;\n\n"; |
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) | |
button-start(nil) | |
(text-properties-at (button-start b)) | |
(let* ((b (treemacs-goto-button (car it))) (props (text-properties-at (button-start b))) (new-path (nth (- (length it) 1) it))) (button-put b :path new-path) (button-put b :symlink (or (button-get b :symlink) (let (needle) (let ((list (cdr it)) (continue t) (it-index 0)) (while (and list continue) (let (...) (if ... ... ...)) (setq it-index (1+ it-index)) (setq list (cdr list)))) needle))) (button-put b :collapsed (- (length it) 2)) (end-of-line) (let* ((beg (point)) (dir (car (cdr it))) (parent (file-name-directory dir))) (insert dir) (add-text-properties beg (point) props) (add-text-properties (button-start b) (+ beg (length parent)) (quote (face treemacs-directory-collapsed-face))))) | |
(let ((it (car --dolist-tail--))) (if (with-no-warnings treemacs-filewatch-mode) (progn (treemacs--start-watching (car it)) (let ((--dolist-tail-- (nthcdr 2 it))) (while --dolist-tail-- (le |
#lang racket | |
(void (let ((a 0)) | |
(vector-immutable | |
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a |