From 8aff0ba9185076b0a2ee92d43c2abfea2802b174 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Wed, 26 Apr 2023 18:29:01 +0530 Subject: [PATCH] Clarify how to deal with init.lua --- docs/en/src/configuration.md | 13 +++++++++++++ src/init.lua | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/docs/en/src/configuration.md b/docs/en/src/configuration.md index a73954d..420d388 100644 --- a/docs/en/src/configuration.md +++ b/docs/en/src/configuration.md @@ -133,3 +133,16 @@ return { } } ``` + +--- + +> Note: +> +> It's not recommended to copy the entire configuration, unless you want to +> freeze it and miss out on useful updates to the defaults. +> +> Instead, you can use this as a reference to overwrite only the parts you +> want to update. +> +> If you still want to copy the entire configuration, make sure to put your +> customization before the return statement. diff --git a/src/init.lua b/src/init.lua index f03a565..256009a 100644 --- a/src/init.lua +++ b/src/init.lua @@ -3025,3 +3025,15 @@ return { on_mode_switch = {}, on_layout_switch = {}, } + +-- ---------------------------------------------------------------------------- +-- > Note: +-- > +-- > It's not recommended to copy the entire configuration, unless you want to +-- > freeze it and miss out on useful updates to the defaults. +-- > +-- > Instead, you can use this as a reference to overwrite only the parts you +-- > want to update. +-- > +-- > If you still want to copy the entire configuration, make sure to put your +-- > customization before the return statement.