Disable Default Modes - ie annotate,autofill,bookmark etc

Hi Guys. I asked this question before but it was a long time ago and I'm not sure if it was here or in some random github issue but I can't seem to find it and the answer didn't quite work....

Nyxt by default loads several modes I don't need. Ex: annotate, autofill, bookmark, hint, password.

To enable a mode as default I do:

(define-configuration web-buffer
  ((default-modes `(
                    nyxt/mode/user-script:user-script-mode
                    nyxt/mode/reduce-tracking:reduce-tracking-mode
                    nyxt/mode/no-webgl:no-webgl-mode
                    nyxt/mode/vi:vi-normal-mode)))
)

Is there a way to disable the built-in default modes at startup?

So far I've run below shell command:
for mode in annotate.lisp autofill.lisp bookmark.lisp hint.lisp password.lisp ; do file="$(tac "$mode"| sed '/((default-modes (cons /,+1d' | tac)" && echo "$file" > "$mode" ;done

This removes the config lines like below in each of the modes I don't need before I compile:

 (define-configuration context-buffer
    ((default-modes (cons 'annotate-mode %slot-value%))))

Is there another way to do this?

Or even an option at compile time to disable certain features/modes?

Thanks.

1 Like

It's not possible to conditionally define modes at compile time.

A mode may be defined and yet disabled. Why are interested in preventing its definition at compile time?

I'm not specifically looking to prevent it at compile time but rather looking for a way to disable the built-in default modes at startup/ in the config.

I don't know lisp/not a developer so the above was the only way that I figured out how to do it - which was before compiling. But a config option would be preferred.

Thanks.