Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutor doesn't show up #5876

Closed
ClementNerma opened this issue Feb 7, 2023 · 4 comments
Closed

Tutor doesn't show up #5876

ClementNerma opened this issue Feb 7, 2023 · 4 comments
Labels
C-bug Category: This is a bug

Comments

@ClementNerma
Copy link

Summary

So, maybe I'm dumb, but on latest version I can't seem to open the tutor.
Weither I use :tutor or run hx --tutor, absolutely nothing happens.

Reproduction Steps

Run hx with --tutor or use :tutor

Helix log

~/.cache/helix/helix.log
<EMPTY> (0 byte)

Platform

WSL on Windows 11

Terminal Emulator

Windows Terminal

Helix Version

helix 22.12 (96ff64a)

@ClementNerma ClementNerma added the C-bug Category: This is a bug label Feb 7, 2023
@the-mikedavis
Copy link
Member

You need to set up the runtime directory:

helix/README.md

Lines 60 to 96 in c704701

Helix needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
| OS | Command |
| -------------------- | ------------------------------------------------ |
| Windows (Cmd) | `xcopy /e /i runtime %AppData%\helix\runtime` |
| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
| Linux / macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
Starting with Windows Vista you can also create symbolic links on Windows. Note that this requires
elevated privileges - i.e. PowerShell or Cmd must be run as administrator.
**PowerShell:**
```powershell
New-Item -ItemType Junction -Target "runtime" -Path "$Env:AppData\helix\runtime"
```
Note: "runtime" must be absolute path to the runtime directory.
**Cmd:**
```cmd
cd %appdata%\helix
mklink /D runtime "<helix-repo>\runtime"
```
The runtime location can be overridden via the `HELIX_RUNTIME` environment variable.
> NOTE: if `HELIX_RUNTIME` is set prior to calling `cargo install --locked --path helix-term`,
> tree-sitter grammars will be built in `$HELIX_RUNTIME/grammars`.
If you plan on keeping the repo locally, an alternative to copying/symlinking
runtime files is to set `HELIX_RUNTIME=/path/to/helix/runtime`
(`HELIX_RUNTIME=$PWD/runtime` if you're in the helix repo directory).
Packages already solve this for you by wrapping the `hx` binary with a wrapper
that sets the variable to the install dir.

How did you install? Build from source, a package manager, or one of the binaries from https://github.com/helix-editor/helix/releases/latest?

@ClementNerma
Copy link
Author

ClementNerma commented Feb 7, 2023

Thanks! I'm going to try that. Seems like I can't RTFM ^^"

It was from the release page (helix-22.12-x86_64-linux.tar.xz)

EDIT: It works, thanks for your help! A simple cp -r ./helix-22.12-x86_64-linux/runtime ~/.config/helix/runtime did the trick.

@ClementNerma
Copy link
Author

Maybe it could be an idea to show an error message if the runtime directory isn't available, instead of silently failing?

@the-mikedavis
Copy link
Member

There's a PR along those lines: #5076

Explaining what the runtime directory is and how to fix it takes a fair amount of text though so we're waiting on support for in-editor longer form documentation (#997)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants