vim-ctrlspace icon indicating copy to clipboard operation
vim-ctrlspace copied to clipboard

.cs_file in read only directories

Open ldelossa opened this issue 4 years ago • 2 comments

Describe the bug I do not see an option to store cs_file in an arbitrary directory of our liking.

The inability to do this breaks building caches for read only directories.

To Reproduce Seems like you use Go, so browse into /usr/local/go/src/ and do a files listing.

Most likely, if you're doing this as your normal user, the /usr/local/go dir is read-only and a cs_file cannot be written.

This breaks ctrlspace's ability to list files utilizing a cache.

Expected behavior A configuration option which allows a prefixed/suffixed cs_file to be created in an arbitrary path of the user's liking. Such as ~/.config/ctrlspace/ for instance.

ldelossa avatar May 07 '21 14:05 ldelossa

That's a reasonable feature request. Though we can't guarantee when we might get around to implementing it.

Are you unable to clone the repo you're working on to a location writable to your user? Another possible workaround is to let g:CtrlSpaceEnableFilesCache = 0, which will forego using a files cache entirely, and use rg, fd or ag to collect your project files each time CtrlSpace enters Files mode. This is only suitable for not so large repos though (<1k files on my system).

jyscao avatar May 10 '21 02:05 jyscao

My assumption is that large read only directories are rather common, be it a net-location or anything in Go's mod cache. Any work around seems like a compromise in performance or a caveat on usage.

ldelossa avatar May 10 '21 10:05 ldelossa