I installed helix in October 2023 for the first time, and all was working well, including rust-analyzer and syntax highlighting. But I can't remember the details of the install process -- I think it was very easy, no serious extra steps involved. After a break of a few months, I tried to launch it again, and syntax highlighting was missing. Observation: ``` $ ls /usr/share/helix/runtime/ queries themes tutor ``` There is no grammar directory, which was there earlier. hx --grammar fetch and hx --grammar build do generate it, then all is working fine again. I have no real idea about the issue, I tried to study https://wiki.gentoo.org/wiki/Helix, but the solution was not really obvious for me. Well now it works for me again, so feel free to close this report when you think it is not really an issue. This is for ``` $ emerge -pv rust These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 1.22 s (backtrack: 0/20). [ebuild R ] dev-lang/rust-1.77.1:stable/1.77::gentoo USE="clippy lto nightly parallel-compiler profiler rust-analyzer rust-src rustfmt (-big-endian) -debug -dist -doc (-llvm-libunwind) (-miri) (-system-bootstrap) (-system-llvm) -test -verify-sig -wasm" CPU_FLAGS_X86="sse2" LLVM_TARGETS="AMDGPU (X86) -AArch64 -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -XCore -Xtensa" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB salewski@hx90 ~ $ emerge -pv helix These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 1.19 s (backtrack: 0/20). [ebuild R ~] app-editors/helix-24.03::gentoo USE="-debug" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB ``` I just saw that there is now a stable Helix 23.10-r2 available, maybe I should try that. Reproducible: Always Steps to Reproduce: 1.emerge -av helix 2.hx myrustcode.rs 3.
Did you see https://gitweb.gentoo.org/repo/gentoo.git/tree/app-editors/helix/helix-24.03.ebuild#n335? Maybe we should add that to the wiki...
Oh sorry, I missed that message. It is printed in ordinary text color only. I guess for first install I saw that message and followed the instructions. Then a reinstall must have removed the grammar folder. It would be really nice if someone could copy these instructions to the wiki. Thank you very much for the fast response -- I think we can close this issue.
It's me agian :-) The instructions ``` einfo "Grammars are not installed yet. To fetch and install them, run:" einfo "" einfo " hx --grammar fetch" einfo " hx --grammar build" ``` are actually not that clear. At least I was not sure if we should run them directly after "emerge helix" as root. When we do so, grammar folder is created in /root/.config/helix/runtime/ which should not be intended. But running as user after creating the symlink ln -s /usr/share/helix/runtime ~/.config/helix/runtime as told in the wiki should not work. So I guess the solution might be, as user ``` cp /usr/share/helix/runtime ~/.config/helix/runtime hx --grammar fetch hx --grammar build ```
Well, setting the environment variable export HELIX_RUNTIME=/usr/share/helix/runtime (in .bashrc) after hx --grammar fetch hx --grammar build as user seems to be enough, no need to symlink or copy /usr/share/helix/runtime.