pocco81 / true-zen.nvim

🦝 Clean and elegant distraction-free writing for NeoVim
GNU General Public License v3.0
984 stars 30 forks source link

Automatically set default values for omitted options in configuration. #42

Closed luiz00martins closed 3 years ago

luiz00martins commented 3 years ago

In the doc/true-zen.txt there's an example configuration. I expected those to be the default options, and using them or not to be optional, and if not manually set, they would just be set to those defaults.

So, I copied the configs and deleted the line for top_padding, as I like the default value. However, when running :TZAtaraxis, I received the error message "attempt to concatenate field 'top_padding' (a nil value)". It seems like if you don't set any value, it always defaults to nil.

At least in my experience, users usually don't change most of the settings, so allowing them to simply be omitted would trim down the size of their configurations by a lot (in my case, almost 5 fold). It would be nice if the values of the configurations would default to those sensible ones presented in doc/true-zen.txt when omitted.

pocco81 commented 3 years ago

My bad! I'll fix this ASAP.