From 0dc7673793629b0f89cbc9fa73c4e74f66e7b91c Mon Sep 17 00:00:00 2001 From: Karim Abou Zeid <7303830+kabouzeid@users.noreply.github.com> Date: Wed, 1 Jan 2025 16:35:53 +0100 Subject: [PATCH 1/2] Update helix instructions `rev = main` doesn't work as I expected. It will never move to a new commit. For now we just have to update `rev` to newer commit hashes every now and then :/ Also clarified the instructions for linking `highlights.scm` --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a899fb..602b4ed 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,15 @@ comment-tokens = "#" [[grammar]] name = "ghostty" -source = { git = "https://github.com/bezhermoso/tree-sitter-ghostty", rev = "main" } +source = { git = "https://github.com/bezhermoso/tree-sitter-ghostty", rev = "e1a73c6231b9d760cd01204f9467d82a9d46bcb9" } ``` -2. In your `runtime` directory, symlink `./queries/ghostty/highlights.scm` to `grammars/sources/ghostty/queries/highlights.scm` +2. Symlink the `highlights.scm` file. Assuming your config directory is `~/.config/helix`: +```bash +mkdir -p ~/.config/helix/runtime/queries/ghostty +cd ~/.config/helix/runtime/queries/ghostty/ +ln -s ../../grammars/sources/ghostty/queries/ghostty/highlights.scm . +``` [Ghostty]: https://ghostty.org [nvim-treesitter]: https://github.com/nvim-treesitter/nvim-treesitter From ba31171a2832f04cf71514d6e38eb603cc7069b9 Mon Sep 17 00:00:00 2001 From: Karim Abou Zeid <7303830+kabouzeid@users.noreply.github.com> Date: Wed, 1 Jan 2025 16:44:00 +0100 Subject: [PATCH 2/2] Same helix filetype logic as vim ftdetect --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 602b4ed..cd9fae0 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ expected paths. You can add this line to the top of your config file if its file name = "ghostty" scope = "source.ghostty" injection-regex = "ghostty" -file-types = [{ glob = "*ghostty/config" }] +file-types = [{ glob = "*ghostty/config*" }, { glob = "*ghostty/themes/*" }] grammar = "ghostty" comment-tokens = "#"