Replies: 7 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Would it be a good idea to store the binary in |
Beta Was this translation helpful? Give feedback.
-
The problem with that is... what happens if there are multiple users on a machine? They would all be forced to use the same config. That's why things get put in your home dir, instead. If every system used the XDG_* env vars, it would give a handy place to store things, but not every system uses those. So instead of having a huge if/else or match, trying to decide where to put things based on which system you're on, it is simpler to put these things under your home dir. |
Beta Was this translation helpful? Give feedback.
-
But the config would still be at
Even though I like the XDG standard, I get your point that Windows does not use these. That's why I suggested the config_dir/cache_dir functions, which also work on Windows.
This would be prevented using the config_dir/cache_dir functions. Let them handle the complexity of supporting different OS's (which they already do), and just be sure that the config files are in the config directory of that OS, the cache files are in the cache directory of that OS, etc. |
Beta Was this translation helpful? Give feedback.
-
I agree with the idea of using os.config_dir(). I was mainly responding to your question of why not use |
Beta Was this translation helpful? Give feedback.
-
Ah okay. Sorry that I explained it again then. I suggested |
Beta Was this translation helpful? Give feedback.
-
It's not a problem, just a "catch-all" decision. V also caches built objects, etc. For the binary, it is already being built in $VMODULES/vls/bin, and no there's no problem sharing the binary, since it uses the separate config file. |
Beta Was this translation helpful? Give feedback.
-
Describe the feature
I don't like tools that clutter up my $HOME dir.
vls
does. I've started to move the vls files to the user config and cache directory, see vlang/vls#430. This only implements half of it though.v ls --install
still creates~/.vls
and puts in thevls.config.json
file (can be moved toos.config_dir()/vls/config.json
) andbin
andsrc
folder. I'm not sure where they can be moved to, though. Maybe$VMODULES
(I'm not sure where it's for). I'm open for suggestions for this.Use Case
To use the example sentence "I'm always frustrated when..." programs clutter my home directory.
Proposed Solution
Move files to their designated folder. Use
os.config_dir()
andos.cache_dir()
.Other Information
See feature description.
Acknowledgements
Version used
V 0.3.3 4ef6e16
Environment details (OS name and version, etc.)
newest MacOS
vls version 0.0.1.95b446e
Beta Was this translation helpful? Give feedback.
All reactions