Styx
Styx configuration language support with syntax highlighting and LSP
LanguagesLanguage servers
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Styx. The extension's id is styx.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Styx Extension for Zed
Syntax highlighting and language support for the Styx configuration language in Zed.
Features
- Syntax highlighting via tree-sitter
- Bracket matching and auto-closing
- Automatic indentation
- Language injection in heredocs (e.g., SQL, JSON, HTML)
Installation
From Zed Extensions (Recommended)
- Open Zed
- Open the Extensions panel (
cmd+shift+xorView > Extensions) - Search for "Styx"
- Click Install
Manual Installation
# Clone the repository
git clone https://github.com/bearcove/styx
cd styx/editors/zed-styx
# Copy to Zed extensions directory
mkdir -p ~/.config/zed/extensions/installed/styx
cp -r . ~/.config/zed/extensions/installed/styx/
Heredoc Language Injection
Styx supports heredocs with language hints for syntax highlighting:
query <<SQL,sql
SELECT * FROM users
WHERE active = true
SQL
template <<HTML,html
<div class="container">
<h1>Hello, World!</h1>
</div>
HTML
The language after the comma (e.g., sql, html) triggers syntax highlighting for that language within the heredoc content.
Development
To work on the extension locally:
# Link the extension for development
ln -s $(pwd)/editors/zed-styx ~/.config/zed/extensions/installed/styx
# After making changes to the tree-sitter grammar:
cd crates/tree-sitter-styx
npx tree-sitter generate
# Restart Zed to pick up changes
Related
- Styx Language - The Styx configuration language
- tree-sitter-styx - Tree-sitter grammar for Styx