A complete integration of Coda Formula Language (CFL) support into Google Antigravity, providing syntax highlighting and AI-powered formula generation for Coda Makers.
Important
Early Stage Project - Light Testing
This project has undergone very light testing and should be considered experimental. While the core functionality (syntax highlighting and AI-powered formula generation) has been validated, it has not been extensively tested in production environments. Use with caution and please report any issues you encounter.
- ✅ Basic syntax highlighting validated
- ✅ AI agent CFL generation tested (8 validation tasks)
⚠️ Limited real-world usage⚠️ May contain undiscovered edge cases
Recommendation: Test thoroughly in your own environment before relying on this for critical work.
- 🎨 Syntax Highlighting - JavaScript-based syntax highlighting for
.codafiles - 📚 Comprehensive Documentation - Complete CFL reference materials for AI agents
- 💡 Example Formulas - 3 levels of examples (basic, intermediate, advanced)
- 🤖 AI Agent Integration - Antigravity agents can generate CFL from natural language
- ✅ Validated - Tested agent capabilities with 8-task validation suite
Enable syntax highlighting for .coda files:
- Open Antigravity Settings (
Cmd + ,on Mac,Ctrl + ,on Windows/Linux) - Search for "File Associations"
- Click "Add Item"
- Set:
*.coda→javascript
See FILE-ASSOCIATION-SETUP.md for detailed instructions.
Open the example files to see syntax highlighting in action:
examples/basic-formulas.coda- Filter, Count, basic operationsexamples/intermediate-formulas.coda- thisRow, User(), conditionalsexamples/advanced-formulas.coda- Chaining, named formulas, optimization
Use the validation prompt to test Antigravity's CFL generation:
See EXAMPLE-VALIDATION-PROMPT.md for a quick 5-task test
smartCFL/
├── README.md # This file
├── FILE-ASSOCIATION-SETUP.md # Setup instructions
├── EXAMPLE-VALIDATION-PROMPT.md # Quick agent test
├── coda-reference/ # CFL documentation
│ ├── Coda Formula Language Documentation.md
│ ├── Coda Formula Development Guide.md
│ ├── General CFL Integration Guidance.md
│ └── Simple File Association for Code Highlighting.md
├── examples/ # Example .coda files
│ ├── basic-formulas.coda
│ ├── intermediate-formulas.coda
│ └── advanced-formulas.coda
└── validation/ # Agent testing
├── agent-prompt.md # 8-task validation suite
└── test-results.md # Validation results
CFL shares structural similarities with JavaScript:
- Dot-chaining:
Table.Filter(...).Count() - Function calls with parentheses
- String literals and operators
By mapping .coda files to JavaScript, we get ~90% accurate syntax highlighting without building a custom extension.
The coda-reference/ directory contains comprehensive CFL documentation that Antigravity agents reference when generating formulas. This enables:
- Natural language → CFL formula generation
- Best practices application (chaining syntax, named formulas)
- Contextual understanding (thisRow, User(), table relationships)
// Show all fruits from produce table
Produce.Filter(Fruit or Vegetable = "Fruit").Name
// My incomplete tasks
Tasks.Filter(Assignee = User() AND Status != "Done")
// Status indicator
SwitchIf(
thisRow.Priority = "Critical", "🔴 Critical",
thisRow.Priority = "High", "🟠 High",
thisRow.Priority = "Medium", "🟡 Medium",
"🟢 Low"
)
// Active projects due soon
Projects
.Filter(Status = "Active")
.Filter(Owner = User())
.Filter(Due Date < Today().AddDays(7))
.Sort(false, Due Date)
.Name
The AI agent successfully passed all validation tests:
✅ Syntax Correctness - Proper CFL syntax with chaining
✅ Documentation Reference - Appropriate doc references
✅ Best Practices - Named formulas, SwitchIf over nested If
✅ Contextual Understanding - Correct use of thisRow, User(), relationships
✅ Completeness - All 8 tasks completed with explanations
See validation/test-results.md for details.
Filter()- Filter lists based on criteriaCount()- Count items in a listUser()- Get current user informationthisRow- Reference current row contextContains()- Check list membershipIf()/SwitchIf()- Conditional logic
- Equality:
=,!= - Comparison:
<,>,<=,>= - Logical:
AND/&&,OR/|| - Dot operator:
.(for chaining)
- Formula Development - Write and test Coda formulas with syntax highlighting
- Learning CFL - Study examples at different complexity levels
- AI-Assisted Development - Generate formulas from natural language descriptions
- Documentation - Reference comprehensive CFL guides within your IDE
- Google Antigravity (VS Code-based)
- File association configuration (one-time setup)
This workspace demonstrates CFL integration into Antigravity. To extend:
- Add more example formulas to
examples/ - Enhance documentation in
coda-reference/ - Create additional validation scenarios
- Share your CFL patterns and best practices
This project contains documentation and examples for educational purposes. Coda Formula Language is property of Coda.io.
- Built for Google Antigravity
- CFL documentation based on official Coda resources
- Syntax highlighting uses VS Code file association method
Ready to build Coda formulas with AI assistance? Configure the file association and start exploring the examples!