Skip to content

Commit

Permalink
Merge branch 'helix-editor:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mabasic committed Oct 29, 2023
2 parents 2b5a982 + f992c3b commit cd7e66f
Show file tree
Hide file tree
Showing 23 changed files with 713 additions and 66 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ jobs:
OUTDIR=$(basename ${{ github.ref }})
echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
- name: Deploy
- name: Deploy stable
uses: peaceiris/actions-gh-pages@v3
if: startswith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
destination_dir: ./${{ env.OUTDIR }}

- name: Deploy stable
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: startswith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
destination_dir: ./${{ env.OUTDIR }}
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ jobs:
rust: stable
target: aarch64-unknown-linux-gnu
cross: true
- build: riscv64-linux
os: ubuntu-latest
rust: stable
target: riscv64gc-unknown-linux-gnu
cross: true
# - build: riscv64-linux
# os: ubuntu-latest
# rust: stable
# target: riscv64gc-unknown-linux-gnu
# cross: true
- build: x86_64-macos
os: macos-latest
rust: stable
Expand Down
260 changes: 260 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

73 changes: 47 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23.05
23.10
2 changes: 2 additions & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
| llvm |||| |
| llvm-mir |||| |
| llvm-mir-yaml || || |
| lpf || | | |
| lua |||| `lua-language-server` |
| make || | | |
| markdoc || | | `markdoc-ls` |
Expand Down Expand Up @@ -164,6 +165,7 @@
| tsx |||| `typescript-language-server` |
| twig || | | |
| typescript |||| `typescript-language-server` |
| typst || | | `typst-lsp` |
| ungrammar || | | |
| unison || | | |
| uxntal || | | |
Expand Down
26 changes: 23 additions & 3 deletions book/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Or, create a symbolic link:
ln -Ts $PWD/runtime ~/.config/helix/runtime
```

If the above command fails to create a symbolic link because the file exists either move `~/.config/helix/runtime` to a new location or delete it, then run the symlink command above again.
If the above command fails to create a symbolic link because the file exists either move `~/.config/helix/runtime` to a new location or delete it, then run the symlink command above again.

#### Windows

Expand Down Expand Up @@ -257,12 +257,32 @@ following order:
1. `runtime/` sibling directory to `$CARGO_MANIFEST_DIR` directory (this is intended for
developing and testing helix only).
2. `runtime/` subdirectory of OS-dependent helix user config directory.
3. `$HELIX_RUNTIME`.
4. `runtime/` subdirectory of path to Helix executable.
3. `$HELIX_RUNTIME`
4. Distribution-specific fallback directory (set at compile time—not run time—
with the `HELIX_DEFAULT_RUNTIME` environment variable)
5. `runtime/` subdirectory of path to Helix executable.
This order also sets the priority for selecting which file will be used if multiple runtime
directories have files with the same name.
#### Note to packagers
If you are making a package of Helix for end users, to provide a good out of
the box experience, you should set the `HELIX_DEFAULT_RUNTIME` environment
variable at build time (before invoking `cargo build`) to a directory which
will store the final runtime files after installation. For example, say you want
to package the runtime into `/usr/lib/helix/runtime`. The rough steps a build
script could follow are:
1. `export HELIX_DEFAULT_RUNTIME=/usr/lib/helix/runtime`
1. `cargo build --profile opt --locked --path helix-term`
1. `cp -r runtime $BUILD_DIR/usr/lib/helix/`
1. `cp target/opt/hx $BUILD_DIR/usr/bin/hx`
This way the resulting `hx` binary will always look for its runtime directory in
`/usr/lib/helix/runtime` if the user has no custom runtime in `~/.config/helix`
or `HELIX_RUNTIME`.
### Validating the installation
To make sure everything is set up as expected you should run the Helix health
Expand Down
3 changes: 3 additions & 0 deletions contrib/Helix.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
<content_rating type="oars-1.1" />

<releases>
<release version="23.10" date="2023-10-24">
<url>https://helix-editor.com/news/release-23-10-highlights/</url>
</release>
<release version="23.05" date="2023-05-18">
<url>https://github.com/helix-editor/helix/releases/tag/23.05</url>
</release>
Expand Down
6 changes: 3 additions & 3 deletions helix-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ integration = []
[dependencies]
helix-loader = { version = "0.6", path = "../helix-loader" }

ropey = { version = "1.6.0", default-features = false, features = ["simd"] }
ropey = { version = "1.6.1", default-features = false, features = ["simd"] }
smallvec = "1.11"
smartstring = "1.0.1"
unicode-segmentation = "1.10"
Expand All @@ -30,8 +30,8 @@ once_cell = "1.18"
arc-swap = "1"
regex = "1"
bitflags = "2.4"
ahash = "0.8.3"
hashbrown = { version = "0.14.1", features = ["raw"] }
ahash = "0.8.5"
hashbrown = { version = "0.14.2", features = ["raw"] }
dunce = "1.0"

log = "0.4"
Expand Down
11 changes: 10 additions & 1 deletion helix-loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ pub fn initialize_log_file(specified_file: Option<PathBuf>) {
/// 1. sibling directory to `CARGO_MANIFEST_DIR` (if environment variable is set)
/// 2. subdirectory of user config directory (always included)
/// 3. `HELIX_RUNTIME` (if environment variable is set)
/// 4. subdirectory of path to helix executable (always included)
/// 4. `HELIX_DEFAULT_RUNTIME` (if environment variable is set *at build time*)
/// 5. subdirectory of path to helix executable (always included)
///
/// Postcondition: returns at least two paths (they might not exist).
fn prioritize_runtime_dirs() -> Vec<PathBuf> {
Expand All @@ -81,6 +82,14 @@ fn prioritize_runtime_dirs() -> Vec<PathBuf> {
rt_dirs.push(dir.into());
}

// If this variable is set during build time, it will always be included
// in the lookup list. This allows downstream packagers to set a fallback
// directory to a location that is conventional on their distro so that they
// need not resort to a wrapper script or a global environment variable.
if let Some(dir) = std::option_env!("HELIX_DEFAULT_RUNTIME") {
rt_dirs.push(dir.into());
}

// fallback to location of the executable being run
// canonicalize the path in case the executable is symlinked
let exe_rt_dir = std::env::current_exe()
Expand Down
Loading

0 comments on commit cd7e66f

Please sign in to comment.