Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: is there a default configuration file? #30

Open
hu-chia opened this issue Jun 10, 2022 · 4 comments
Open

Question: is there a default configuration file? #30

hu-chia opened this issue Jun 10, 2022 · 4 comments

Comments

@hu-chia
Copy link

hu-chia commented Jun 10, 2022

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 ).

@iainh
Copy link
Contributor

iainh commented Jun 13, 2022

@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.

@kevinmatthes
Copy link
Contributor

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?

@mcobzarenco
Copy link
Collaborator

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! 😅

@kevinmatthes
Copy link
Contributor

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants