zee icon indicating copy to clipboard operation
zee copied to clipboard

Question: is there a default configuration file?

Open hu-chia opened this issue 3 years ago • 4 comments

I noticed an option --create-settings, but it just opens an empty file, I have no idea how to write my configuration ( for me, I want to save the theme ).

hu-chia avatar Jun 10 '22 08:06 hu-chia

@guyeu The only property settable in the configuration file is theme_index. It holds the numeric index of the theme starting from the default, 0. so the second theme, base16-solarized-dark, is 1, base16-synth-midnight is 2, etc. Unfortunately, there is actually a bug in the startup code where the theme_index from the configuration file is not used, instead always using theme index 0. This is fixed in pull requests #32 (theme_index) or #33 (if you want to use the theme name) which you can apply manually until there is a fix in master.

iainh avatar Jun 13 '22 19:06 iainh

Due to both #32 and #33 being merged as of this comment, I would like to suggest to add a commented list of the possible values to set (theme_index (#32) and theme_name (#33)). This would make the process of setting up the desired configuration easier, at least in my opinion. Furthermore, this would avoid the problem of the blank file this issue was originally about.

That way, users have a brief overview which aspects of their installation of zee they can influence in order to make working with the software more efficient.

What do you think about this suggestion?

kevinmatthes avatar Jul 15 '22 13:07 kevinmatthes

Sorry for being so slow to answer this! The "settings file" is half-baked right now -- there's not a lot to configure. I am working on changing this in #29 and making many more things configurable (e.g. the tree sitter parsers and modes in that PR + key bindings in a follow up).

I would like to suggest to add a commented list of the possible values There's a command line argument to generate (a well commented) default configuration file as a starting point. I will add the currently available themes there.

Medium term, I'd like to move the themes themselves from the source code and into the configuration file, so adding a theme doesn't require rebuilding or a PR! :sweat_smile:

mcobzarenco avatar Jul 16 '22 18:07 mcobzarenco

@guyeu: the default configuration file can be created with the following command as described in the README:

zee --init --build

There had been significant progress to the code base since you had been authoring this issue. This progress introduces the requested functionality. Please note that the command line option for the default configuration file was changed. At the moment, this feature is only available when building directly from this repository, see "nightly version" in the README:

cargo install --git https://github.com/zee-editor/zee

I am convinced that there will be an official release introducing these changes soon but I cannot foresee the exact point of time. Until the version on crates.io was updated, the nightly version works pretty well and stable.

Does this answer your question?

kevinmatthes avatar Jul 18 '22 03:07 kevinmatthes