

- Grammar
- Comments
- Raw values
- Numbers
- Percents
- Colors
- Palette
- Keybindings
- Chords
- Modifiers
- Actions & arguments
- Special keys (e.g.
tab
,space
,up
)
- Tests
- Capture highlight groups
- Stable release
- Contribute queries to [nvim-treesitter] (No longer accepting experimental parsers)
Add this:
{
"bezhermoso/tree-sitter-ghostty",
build = "make nvim_install",
}
Note
Having [nvim-treesitter] installed is not required. However if you have it installed, this plugin will attempt to register
itself as a parser so that nvim-treesitter
can manage it e.g. :TSInstall! ghostty
.
Installing this as a plugin should automatically enable syntax highlighting for Ghostty configuration files located in expected paths. You can add this line to the top of your config file if its filetype is not detected automatically:
+# vim: ft=ghostty
#
# The rest of your Ghostty configuration 👻...
This grammar is now included in upstream Helix: https://github.com/helix-editor/helix, however if you do not current have highlighting, you can set it up manually using the following steps:
- Add this to your
languages.toml
[[language]]
name = "ghostty"
scope = "source.ghostty"
file-types = [{ glob = "ghostty/config" }]
comment-tokens = "#"
indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "ghostty"
source = { git = "https://github.com/bezhermoso/tree-sitter-ghostty" , rev = "8438a93b44367e962b2ea3a3b6511885bebd196a" }
-
Download the ghostty highlight queries from upstream and install them into the Helix runtime directory (located in config):
runtime/queries/ghostty/highlights.scm
-
Build and fetch the grammar
hx -g fetch && hx -g build