Giter VIP home page Giter VIP logo

Comments (10)

eleijonmarck avatar eleijonmarck commented on July 20, 2024 2

image
I now get highlighting and goto definition and stuffz !!

from helix.

pickfire avatar pickfire commented on July 20, 2024 1

https://docs.helix-editor.com/install.html#build-from-source

Ah, so you mean

Now copy the runtime/ directory somewhere. Helix will by default look for the runtime inside the same folder as the executable, but that can be overriden via the HELIX_RUNTIME environment variable.

I was confused about that either. No wonder I didn't get syntax highlighting. Oh, I found it. Have to set HELIX_RUNTIME=$PWD. Maybe we should update the docs.

from helix.

pickfire avatar pickfire commented on July 20, 2024

Runtime variable?

from helix.

hovsater avatar hovsater commented on July 20, 2024

An example from my personal configuration.

/tmp $ which hx
/Users/kevinsjoberg/bin/hx
/tmp $ ls -l $HOME/.config/helix/
total 8
-rw-r--r--  1 kevinsjoberg  staff  1560 Jun  2 22:09 helix.log
drwxr-xr-x@ 3 kevinsjoberg  staff    96 Jun  3 04:07 runtime
/tmp $ echo $HELIX_RUNTIME
/Users/kevinsjoberg/.config/helix/runtime

@pickfire I believe hx will look for the runtime folder in the same directory as the binary by the default. This can be changed by setting the HELIX_RUNTIME environment variable to a different directory.

from helix.

eleijonmarck avatar eleijonmarck commented on July 20, 2024

@kevinsjoberg thx for the clear example.
I downloaded the release, but did not know where to put the things. 👯

from helix.

eleijonmarck avatar eleijonmarck commented on July 20, 2024

Yea I was thinking to update the docs, with this explicit information.
So that It gets easy to open hx and start to play around and making it more frictionless.

from helix.

archseer avatar archseer commented on July 20, 2024

The binary looks for runtime/ where the executable is located, or for a HELIX_RUNTIME override.

pub fn runtime_dir() -> std::path::PathBuf {
// runtime env var || dir where binary is located
std::env::var("HELIX_RUNTIME")
.map(|path| path.into())
.unwrap_or_else(|_| {
std::env::current_exe()
.ok()
.and_then(|path| path.parent().map(|path| path.to_path_buf()))
.unwrap()
})
}

If running this in development via cargo run I recommend using an .envrc file to automatically set the var. We could also try detecting that (if debug mode) and setting it to the correct path.

For packaged installs, I recommend unpacking the files somewhere, then making a hx wrapper that sets the var and runs the binary. Example from Arch Linux

from helix.

eleijonmarck avatar eleijonmarck commented on July 20, 2024

I agree with the package install that sets the VAR to some default where the default runtime is set on all comp.

@archseer
For releases or anything in the documentation, we could add commands that would make it easier to add the ENV to point to a ~/.config/helix by default if not specified.

Maybe this is what you mean by the package installs. But would be great to get this in right away.

Package installer for me did not work:
I did not get it to install for my Ubuntu 20.04 distro though. Maybe this is just me

from helix.

kirawi avatar kirawi commented on July 20, 2024

I don't think it correctly detects it on Windows without the envvar.

from helix.

archseer avatar archseer commented on July 20, 2024

I think this should be solved in 0.2.0, we have more reasonable defaults now.

from helix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.