Closed valignatev closed 2 years ago
Seemed to work for me, is your ~/.vimrc
empty? I am using arch as well, I tried both v0.2.0 and a364d6c3837c36225dcd4ec9b15ef2c192feef0b. Did you use the one in AUR? How did you install or test it out?
yeah just helix-bin from AUR. My vimrc has content. Again, it opens when I manually type it out like :open .vimrc
, and shows the content, but it doesn't open it if I type :open ~/.vimrc
.
yeah just helix-bin from AUR. My vimrc has content. Again, it opens when I manually type it out like
:open .vimrc
, and shows the content, but it doesn't open it if I type:open ~/.vimrc
.
I can reproduce this on master. Seems like an issue with expanding ~
.
I believe this isn't fixed still. While ~ gets expanded to the home directory now, no suggestions for the files are shown. hx --version is 0.3
This is what space f
shows when hx is launched from the home directory
You need to add a trailing slash: ~/
shows results for me.
It doesn't for me
Weird, is your home directory a symlink maybe?
It's an absolute path
And ~
is the only path that has these issues?
The file picker follows .gitignore
/ignorefile
rules, maybe that's the issue?
Oh yeah that's definitely it, my home directory is a git repo with *
in gitignore and forcibly added files that I track:
https://github.com/valignatev/dotfiles/blob/master/.gitignore
I would never have guessed that "git project" is the default behavior for helix and it strictly obeys gitignore like that :)
@archseer Yeah, another person like me which use .git
for home directory, which is why I say we stop the .git
search until the home directory or root directory.
@valignatev One suggestion I can say is used another directory for git. But yeah, that's a temporary solution for just helix. That's also good because it can hide my prompt. Now I just alias home
so it is ~/.home
rather than ~/.git
so stuff don't seemed weird sometimes, and my prompt also does not show the branch for git when at home directory:
alias home 'git --work-tree=/home/ivan --git-dir=/home/ivan/.home'
haha, no thanks, there is no benefit for me to introduce this complexity just to make some text editor work :)
But yeah, probably @pickfire's suggestion to not blindly obey gitignore is a good idea. Generally, even aside from dotfiles case, there are lots of cases when people want to comfortably browse their gitignored files - I browse node_modules, or zig_cache, or rust's cache all the time when I do my development, and those directories are almost always gitignored.
there are lots of cases when people want to comfortably browse their gitignored files
I almost never do this unless I just press "goto declaration" or sort. We could maybe add a flag in file picker to allow browsing through hidden files.
Specifically in the case of the home dir, the recommendation is to use something like rcm (https://github.com/thoughtbot/rcm) or homesick. You'll definitely have issues with more than just Helix otherwise. https://askubuntu.com/questions/1316229/is-it-bad-practice-to-git-init-in-the-home-directory-to-keep-track-of-dot-files
But yes, Helix should have an option to run a filepicker without the ignore flags.
I'm using this approach to manage my home directory for many years already and this is the first time something ever conflicted with it. I've used rcm and bare git repositories in the past, but all other solutions had some problems I didn't want to deal with, so I switched to this current setup that proved to be the best over the years. I'm definitely not the only one who does the same thing, here's another example: https://drewdevault.com/2019/12/30/dotfiles.html that I can recall off the top of my head.
Regardless, I think that discussions about best practices in managing dotfiles might be slightly offtopic for the issue since it seems to be related not only to the home directory, but generally to the topic of browsing ignored files.
I believe someone else recently had this issue on Matrix.
Having something like this would be nice.
Helix can't open files that are in the home directory and in some other directories. Can't quite tell the pattern, but in some directories helix just doesn't open any existing files. As in it doesn't show suggestions. It opens the file if I type its name manually with the relative path, but it can't open the file if I type its path like
~/.vimrc
, e.g. with leading tilde. It says "NOR" and a path to the fileEnvironment
Log file is empty