helix
helix copied to clipboard
Issues when building with source
I am running pop_os! so there is no repository for installation. So I built from source using directions on installation page.
After cargo was done compiling and installing hx, I proceeded to fetch and build the grammars. After editing several files I noticed that the tutor, the syntax highlighting were not working. After looking for things I saw that I needed a symbolic link so I did ln -s ~/.cargo/bin/runtime ~/.config/helix/runtime which didn't fix the issue.
Ultimately what did fix things was copying from the helix repo all of the contents of the runtime folder to ~/.cargo/bin/runtime the language.toml and the other subdirectories were missing.
I believe we just need to make sure all of the runtime contents are copied to the ~/.cargo/bin/runtime folder as part of the cargo install --path helix-term.
Oh also a default config.toml in ~/.config/helix would also be helpful with the default theme.
The symbolic link should work, it could be that your symlink was broken? The fallback is looking for the runtime in the current directory of the executable, which is why it works in ~/.cargo/bin.
I believe we just need to make sure all of the runtime contents are copied to the ~/.cargo/bin/runtime folder as part of the cargo install --path helix-term.
We never want to just install our files to a random directory (~/.cargo/bin is managed by cargo), you could instead set the HELIX_RUNTIME variable to point to a different location.
Make sure you make a hard symlink too, soft ones might not work.
Thank you for the feedback.
Yes, but the runtime folder didn't have everything after running cargo install. Also there was no symlink created automatically I had to do it myself but there were directions on the installation page so not a big deal. However the fact that the .cargo/bin/runtime folder was missing things is the issue.
It is possible that I had done a cargo build accidentally before the cargo install, I have only been working with rust for pet projects and utilities for the last year.
I had to copy from the git source runtime folder into the ~/.cargo/bin/runtime folder before things started working. How I figured it out was I also have a Fedora box where I installed from repo so I was able to see how it should look.
Why ~/.cargo/bin/runtime? It should be ~/.config/helix/runtime
I had the same problem when installing from source. I fixed it by moving the runtime to ~/.config/helix/runtime and then running hx -g fetch && hx -g build. Then I had all of my syntax highlighting working 💯
I think this issue can be closed because the author confused two directories (the solution is provided both in the helix README and here).