[Feature Request]: Variable to change location of vimspector.log from `$HOME` to somewhere else
I really dislike having excessive dotfiles files in my $HOME. A variable, e.g. g:vimspector_log_file, would be helpful.
For now I use a workaround:
autocmd User VimspectorDebugEnded call system("mv ~/.vimspector.log " . $XDG_CACHE_HOME."/vim/")
yeah, this is a fair request. I remember very early on adding the code to set the log file handler and thinking "this will do for now, better think of a better place for this ...."
It should probably be put somewhere under g:vimspector_base_dir. That way, no more options, which is a win.
It should probably be put somewhere under g:vimspector_base_dir.
Well, yes and no. Actually I'd love to have location of configurations to be modifiable too - so I can have it in accordance to XDG Base Dirs specification.
so I can have it in accordance to XDG Base Dirs specification.
let g:vimspector_base_dir=$XGD_WHATEVER_THIS_IS . '/vimspector' ?
The problem with XDG is that it is platform-specific. I need something that works on all platforms, and that I can support with minimal code/effort. I like moving it to base_dir/logs/ as that's consistent with all other runtime files for vimspector.
Reading the XDG base dir spec, it seems to require a bunch of work for applications to actually use it and I would have to document that "Well the log files is in X on Y platform, unless you have $Z set in which case it's in FOOBAR" and write a bunch of tests and stuff.
The same is true perhaps for the configs - should it be in XDG_CONFIG_DIR/blah ? Well, maybe, but then it means I have to write yet more complex documentation which is already enough of a burden that many don't read it.... I dunno how important this is to people though.
let g:vimspector_base_dir=$XGD_WHATEVER_THIS_IS . '/vimspector' ?
There's no XGD_WHATEVER_THIS_IS where g:vimspector_base_dir would fit.
The problem with XDG is that it is platform-specific
Don't make it default. Make it optional.
Two variables: g:vimspector_log_file and g:vimspector_configs_dir, then the documentation:
|g:vimspector_log_file|
If set, changes location of log file
|g:vimspector_configs_dir|
If set, changes location of 'configurations' directory