Closed TLINDEN closed 10 months ago
PS: I found the function common-settings
which allowed me to setup default modes. This is what has been generated in auto-config.3.lisp
:
(defmethod customize-instance ((buffer buffer) &key)
(setf (slot-value buffer 'default-modes)
'(nyxt/mode/force-https:force-https-mode
nyxt/mode/reduce-tracking:reduce-tracking-mode
nyxt/mode/emacs:emacs-mode nyxt/mode/no-script:no-script-mode
nyxt/mode/no-webgl:no-webgl-mode nyxt/mode/no-sound:no-sound-mode
nyxt/mode/bookmark-frequent-visits:bookmark-frequent-visits-mode
nyxt/mode/buffer-listing:buffer-listing-mode
nyxt/mode/bookmarklets:bookmarklets-mode
nyxt/mode/blocker:blocker-mode
nyxt/mode/certificate-exception:certificate-exception-mode
nyxt/mode/annotate:annotate-mode nyxt/mode/bookmark:bookmark-mode
nyxt/mode/history:history-mode nyxt/mode/password:password-mode
nyxt/mode/hint:hint-mode nyxt/mode/document:document-mode
nyxt/mode/search-buffer:search-buffer-mode
nyxt/mode/autofill:autofill-mode
nyxt/mode/spell-check:spell-check-mode base-mode)))
But again it runs in failsafe mode, no errors are being logged, the config is being ignored.
The simplest ans safest option here is to replace %slot-default% with %slot-value% in the config you posted initially. This way, the changes will accumulate on top of defaults, instead of overriding defaults every time.
customize-instance is a powerful thing that should rather be avoided until a case so complex that define-configuration couldn't handle it.
While I'm at it, two questions arised during testing nyxt:
1) I am using the emacs key bindings. If I hit
C-l
then multiple suggestions are listed like new url query, history, buffer list. What is the keybinding to switch diretly to another list (say from new url to history)?
I use C-[ and C-]. There are others, probably. You can C-h m to see the description of the current prompt buffer and C-h b to list and run prompt-related commands.
2) Also using
c-l
when I enter a url without protocol likeblog.fefe.de
nyxt doesn't try to open it but instead opens a websearch which even doesn't find the site. How can I disable this behavior?
Nyxt appends https:// to the URLs, but it does so asynchronously and thus not instantaneously. If you wait for a fraction of second, the scheme will be appended and you'd be able to open the website directly.
@TLINDEN You're having trouble configuring Nyxt because you're lacking pre-requisite knowledge in Common Lisp. I'll not go into details but the Lisp forms you've shared to configure default-modes
aren't valid. Follow the sample below:
(define-configuration web-buffer
((default-modes (append '(nyxt/mode/blocker:blocker-mode
nyxt/mode/force-https:force-https-mode)
%slot-value%))))
Nyxt is being started in failsafe mode due to the mistakes in your config. Please delete /home/scip/.config/nyxt/config.lisp
or the offending contents.
What is the keybinding to switch diretly to another list (say from new url to history)?
Shift-down/up
works for any keyscheme. If you're using the Emacs keyscheme, M-n/p
and M-[/]
are also bound.
Run f1 b
to get a list of available prompt buffer commands.
Also using c-l when I enter a url without protocol like blog.fefe.de nyxt doesn't try to open it but instead opens a websearch which even doesn't find the site. How can I disable this behavior?
I find that to be unintuitive as well, despite the advice @aartaka gave you. I'd suggest opening an issue mentioning that particular quirk.
Closing. Feel free to ask more questions @TLINDEN. There's also a forum at https://discourse.atlas.engineer/.
Describe the bug
Precise recipe to reproduce the issue
Information
show-system-information
:ASDF version: 3.3.1 ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY) Critical dependencies: (/run/build/nyxt/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /run/build/nyxt/_build/cl-gobject-introspection/cl-gobject-introspection.asd /run/build/nyxt/_build/cl-webkit/webkit2/cl-webkit2.asd)
(define-configuration web-buffer ((default-modes (append '(dark-mode) %slot-default%))))
(define-configuration (buffer web-buffer) ((default-modes (append %slot-default% '(noscript-mode) '(noimage-mode) '(nosound-mode) '(nowebgl-mode)))))
(define-configuration web-buffer ((default-modes (append '(dark-mode) %slot-default%)) (default-modes (append '(noscript-mode) %slot-default%)) (default-modes (append '(reduce-tracking-mode) %slot-default%)) (default-modes (append '(blocker-mode) %slot-default%)) (default-modes (append '(nosound-mode) %slot-default%)) (default-modes (append '(nowebgl-mode) %slot-default%))))
(define-configuration buffer ((default-modes (pushnew 'nyxt/mode/emacs:emacs-mode %slot-value%) (pushnew 'nyxt/mode/style:dark-mode %slot-value%))))
Warning: malformed property list: ((PUSHNEW 'NYXT/MODE/STYLE:DARK-MODE %SLOT-VALUE%)).