In the Nyxt manual in the “Keybinding configuration” section, there is this example:
(define-configuration base-mode
"Note the :import part of the define-keyscheme-map.
It re-uses the other keymap (in this case, the one that was slot value before
the configuration) and merely adds/modifies it."
((keyscheme-map
(define-keyscheme-map "my-base" (list :import %slot-value%)
keyscheme:vi-normal
(list "g b"
(lambda-command switch-buffer*
nil
(switch-buffer :current-is-last-p
t)))))))
When I copy this in my config.lisp
and start Nyxt, I get only a white window and this error in the terminal output:
Package KEYSCHEME does not exist.
Line: 8, Column: -1
This similar example works for me:
Change keybinding
So I guess, the example in the manual should be updated to:
(define-configuration base-mode
"Note the :import part of the define-keyscheme-map.
It re-uses the other keymap (in this case, the one that was slot value before
the configuration) and merely adds/modifies it."
((keyscheme-map
(keymaps:define-keyscheme-map "my-base" (list :import %slot-value%)
nyxt/keyscheme:vi-normal
(list "g b"
(lambda-command switch-buffer*
nil
(switch-buffer :current-is-last-p
t)))))))
(The difference is keymaps:define-keyscheme-map
instead of define-keyscheme-map
and nyxt/keyscheme:vi-normal
instead of keyscheme:vi-normal
.)
This way, the error is gone and Nyxt opens as usual. But the g b
keybinding still doesn’t do anything.