Tableau Language Support
This is a work in-progress, and I am not a professional software developer, or any kind of developer at that.
Visual Studio Code extension for Tableau calculation language that brings IDE features like common programming languages have. Write, validate, and format Tableau calculations with syntax highlighting, IntelliSense, real-time error checking, and code completion.
Traditional syntax highlighting:
Formatting mode with code lens:
Features
Syntax Highlighting
- Complete syntax coloring for Tableau functions, operators, and keywords
- Field reference highlighting:
[Sales Amount]
, [Customer Name]
- LOD expression support:
{FIXED [Region] : SUM([Sales])}
- Comment highlighting for
//
and /* */
IntelliSense & Completion
- Auto-completion for 100+ Tableau functions with descriptions
- Parameter hints showing function signatures
- Snippet completion for common calculation patterns
- Context-aware keyword suggestions
Real-time Validation
- Live syntax checking with error highlights
- Bracket matching and balance validation
- IF/THEN/END and CASE/WHEN structure validation - IN DEVELOPMENT
- Function name verification
Code Actions
- Format expressions with proper indentation - IN DEVELOPMENT
- Copy calculations with explanatory comments - IN DEVELOPMENT
- Quick fixes for common syntax errors - IN DEVELOPMENT
- Code lens actions for complex expressions
Getting Started
- Install the extension from VS Code marketplace
- Create a file with
.twbl
extension
- Start writing Tableau calculations
// Example calculation
IF [Sales] > 1000 THEN
"High Value"
ELSEIF [Sales] > 500 THEN
"Medium Value"
ELSE
"Low Value"
END
Configuration
Access settings via File > Preferences > Settings and search for "Tableau":
- Enable Hover: Show function descriptions on hover
- Enable Completion: Auto-complete suggestions
- Enable Diagnostics: Real-time error checking
- Semantic Tokens: Advanced syntax highlighting
- Code Lens: Show inline actions and hints
Commands
- Tableau: Restart Language Server - Restart language features
- Tableau: Hello Tableau - Test extension activation
File Support
Works with .twbl
files (Tableau Language files).
Contributing
Submit issues and pull requests on GitHub. Contributions welcome!
License
MIT License - see LICENSE file for details.