From 02a3963bb44eb398256859c3cb784fdb94165ece Mon Sep 17 00:00:00 2001 From: Daniel Alejandro Tapia Date: Thu, 5 Dec 2024 14:16:58 -0500 Subject: [PATCH] add two editor variables to line-numbers this patch adds two editor variables to line-numbers, `line-format` and `current-line-display-function`. this allows the user to change the width/format of the line numbers and to set the current-line display in relative numbers. for example : ``` (setf (variable-value 'line-number-format :global) "~2D ") (setf (variable-value 'current-line-display-function :global) (lambda () 0)) ``` now the line-numbers will be narrower and the current-line will always be 0. --- src/ext/line-numbers.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ext/line-numbers.lisp b/src/ext/line-numbers.lisp index 7f5777942..b5191e707 100644 --- a/src/ext/line-numbers.lisp +++ b/src/ext/line-numbers.lisp @@ -24,7 +24,8 @@ two-character line-number column.") (define-editor-variable current-line-display-function (lambda () (line-number-at-point (current-point))) - "Set to desired current-line display when relative line numbers are active, for example, (lambda () 0) or (lambda () (string \" ->\")).") + "Set to desired current-line display when relative line numbers are +active, for example, (lambda () 0) or (lambda () (string \" ->\")).") (define-attribute line-numbers-attribute (t :foreground :base07 :background :base01))