Skip to content

Instantly share code, notes, and snippets.

@neoSnakex34
Created December 22, 2025 00:52
Show Gist options
  • Select an option

  • Save neoSnakex34/e7d1108b69908d3e3d504b03ebf7c7be to your computer and use it in GitHub Desktop.

Select an option

Save neoSnakex34/e7d1108b69908d3e3d504b03ebf7c7be to your computer and use it in GitHub Desktop.
a post install script for c/c++ devcontainer
#!/bin/bash
echo "downloading Helix..."
curl -s https://api.github.com/repos/helix-editor/helix/releases/latest \
| jq -r '.assets[] | select(.name | test("x86_64-linux.tar.xz")) | .browser_download_url' > helix_download_url.txt
if [[ ! -s helix_download_url.txt ]]; then
echo "no download found!"
exit 1
fi
echo "downloading latest helix package..."
curl -LO $(cat helix_download_url.txt)
echo "extracting..."
tar -xf helix*.tar.xz
# TODO make it work with rootless docker
echo "installing in /usr/local/bin/"
mv helix*/hx /usr/local/bin/
echo "copying config..."
mkdir -p ~/.config/helix/
mv helix*/runtime ~/.config/helix/
echo '[lsp]
command = "clangd"
root_file = "CMakeLists.txt"
filetypes = ["c", "cpp"]' > ~/.config/helix/clangd.toml
echo "config complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment