Skip to content

Commit

Permalink
helix: reenable haskell syntax highlighting support
Browse files Browse the repository at this point in the history
Haskell syntax highlighting is disabled in `helix-editor` by default.
This is because of an issue compiling tree-sitter-haskell on M1 macs,
as its default compiler doesn't support c++14.
As we're using a nix-derived toolchain, we shouldn't be subject to
this problem.

See [this comment](helix-editor/helix#1384 (comment))
for more info.
  • Loading branch information
414owen committed Dec 26, 2021
1 parent 4707331 commit 72361b8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/applications/editors/helix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ makeWrapper ];

patches = [
./patches/reenable-haskell.patch
];

postInstall = ''
mkdir -p $out/lib
cp -r runtime $out/lib
Expand Down
13 changes: 13 additions & 0 deletions pkgs/applications/editors/helix/patches/reenable-haskell.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs
index 28f85e7..bad1c6b 100644
--- a/helix-syntax/build.rs
+++ b/helix-syntax/build.rs
@@ -175,7 +175,7 @@ fn build_dir(dir: &str, language: &str) {
fn main() {
let ignore = vec![
"tree-sitter-typescript".to_string(),
- "tree-sitter-haskell".to_string(), // aarch64 failures: https://github.com/tree-sitter/tree-sitter-haskell/issues/34
+ // "tree-sitter-haskell".to_string(), // aarch64 failures: https://github.com/tree-sitter/tree-sitter-haskell/issues/34
"tree-sitter-ocaml".to_string(),
];
let dirs = collect_tree_sitter_dirs(&ignore).unwrap();

0 comments on commit 72361b8

Please sign in to comment.