From e30dc449f7d27d9fb0e4a4dd50dfbf5f3e7a2611 Mon Sep 17 00:00:00 2001 From: vindarel Date: Thu, 23 May 2024 11:51:19 +0200 Subject: [PATCH] configuration: show completion candidates right away! --- content/en/usage/configuration.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/content/en/usage/configuration.md b/content/en/usage/configuration.md index ddbf959..175ff1a 100644 --- a/content/en/usage/configuration.md +++ b/content/en/usage/configuration.md @@ -13,10 +13,30 @@ Otherwise, be sure to refer to Lem functions with the `lem:` prefix. {{< toc >}} + +## Show the completion list instantly + +The completion pop-up, like the one we get with `M-x`, wants us to +press TAB before we get the completion candidates. If you want to open +it right away, add this to your init file: + +```lisp +(add-hook *prompt-after-activate-hook* + (lambda () + (call-command 'lem/prompt-window::prompt-completion nil))) + +(add-hook *prompt-deactivate-hook* + (lambda () + (lem/completion-mode:completion-end))) +``` + +You can start typing and the list will narrow down. + + ## Choosing the completion pop-up position: center, top, bottom -Lem's completion pop-up, for example the one that shows on `M-x`, is -by default centered on the middle of the screen. +Lem's completion pop-up is by default centered on the middle of the +screen. Since May of 2024, it is possible to choose its position: à la Emacs at the bottom? À la VSCode at the top?