Enhanced TypeScript/TSX syntax highlighting for Zed editor to match the token granularity of the Behave TextMate theme.
This extension provides more granular syntax highlighting for TypeScript and TSX files, adding distinctions for:
- Properties: Differentiate between member properties, object keys, and shorthand properties
- Functions: Distinguish arrow functions, generators, method signatures, and decorators
- Types: Enhanced highlighting for type parameters, aliases, interfaces, and enums
- Parameters: Separate highlighting for optional, rest, and destructured parameters
- Imports: Granular highlighting for named, default, and namespace imports
- Operators: Special highlighting for optional chaining, nullish coalescing, and type assertions
- Components vs HTML: Different colors for React components (PascalCase) vs HTML elements
- Attributes: Special highlighting for className, event handlers, data/aria attributes
- JSX Expressions: Enhanced highlighting for expressions within JSX
- React Patterns: Recognition of hooks (useXxx), props interfaces, and common patterns
- Clone this repository with submodules:
git clone --recursive https://github.com/yourusername/zed-behave-theme-next.git- Build the extension:
cd zed-behave-theme-next
./build.sh- Install in Zed:
# Copy to Zed extensions directory
cp -r . ~/.config/zed/extensions/zed-behave-theme-nextupstream-zed/- Git submodule tracking Zed's language files (sparse checkout)languages/- Built language definitions with custom highlights appliedcustom-highlights/- Custom Tree-sitter queries extending base highlightingbuild.sh- Script to merge upstream and custom highlights
To update the base language files from Zed:
cd upstream-zed
git pull origin main
cd ..
./build.shEdit files in custom-highlights/ to add or modify highlighting rules. The build script appends these to the base Zed highlights.
Based on the Behave theme colors:
- Variables/Identifiers:
#5AB8E5 - Functions:
#61D29D - Classes/Types:
#f0d879 - Strings:
#ec9076 - Numbers/Constants:
#c9a9f9 - Keywords/Operators:
#7dcbc4 - Comments:
#808691
MIT