-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Allow user config to be stored in home directory #112
Comments
It's something I'm also interested in and to be honest with you, I planned to ask the same question for an obvious reason: I compile To answer your possible question about why I do such thing, is so I can keep It would be wise indeed to have either a |
Hi, I understand the attraction of this mechanism for UNIX users, but under Windows it's a PITA. I'm sure you have all seen the rise of "portable" Windows software ("just copy it into a single directory and it works!"). Some may point out it's a crutch for a poor OS, but it is very convenient for carrying software on a USB stick! Lite is fully "portable" for Windows OS at present. Setting $HOME environment variables may be beyond the knowledge or assigned privileges of many windows users. By all means have an option to use $HOME/.lite/ but please retain the ability to use data/user/init.lua. I also struggle to keep my customisations safe with each new release: I would prefer a distribution with no lua files in the data/user folder - so I don't overwrite my init.lua file! Plugins are the recommended way of customising Lite and are a great resource in the absence of documentation. I would like the plugin autoloader to preferentially load plugins from data/user/plugins/, if the same file name exists in data/plugins/ and data/user/plugins/ - all unique plugins from both sources should be loaded. This would keep my personal and tweaked plugins safe when overwriting with a new release. I guess a similar mechanism could be applied to the loading of colors: distribute with data/colors/ but preferentially load duplicates from data/user/colors/. It should also be possible to do this preferential loading from $HOME/.lite/plugins and $HOME/.lite/colors for those who want. Hacking files in core/ is by definition not really supported for persistent customisation, I guess this is the rôle of pull requests. Hope I haven't made this sound too complicated, I love the KISS approach of Lite. Kind Regards Gavin Holt |
I think there is an extremely easy solution to this issue. @rxi can you please remove I didn't mention anything about In This way we won't have any override / overwrite with each fresh compilation of lite, due to the uniqueness of In short, those who want to customize lite's behavior, all they have to do would be to copy the contents of Even if I compile |
@Gavin-Holt Yeah there's no need for this to get in the way if you don't want to use it on Windows or something. Users who want to stick with the existing approach can keep editing
Surely Windows has a way to identify where user-level config can live without setting environment variables? |
I feel we all have some learning to do when it comes to using software like Lite is. We have all we need already, we don't need to make the author our bitch. -- core/user/init.lua
require(os.getenv("HOME") .. ".lite") And now you have your config in A bit of I personally love this the most about Lite. Don't have to wait for anyone or ask for a permission to do a customization. Nor bother other people with features only we like. I want my caret be a giant puppy, I can do it! |
How about using an environment variable or a startup cli option to configure the config dir, leaving the current working dir as a default? |
You can use my plugin: rxi/lite-plugins#98
|
As far as I can tell, right now if you want to make customizations you have to edit
data/user/init.lua
inside your checkout of the lite repo. Most programs with similar config files allow you to store them as dotfiles in your home directory so you can keep it separate from the source for lite itself. Maybe something like~/.config/lite/init.lua
if you're on a unix system.I can submit a patch for this if you think it's a good idea.
The text was updated successfully, but these errors were encountered: