LookML Language Support for VS Code/Cursor
A comprehensive VS Code and Cursor extension providing syntax highlighting and language support for LookML (Looker Modeling Language) files.
Features
🎨 Syntax Highlighting
- Keywords: Complete coverage of LookML keywords (
view , explore , dimension , measure , etc.)
- Data Types: Highlighting for all LookML data types (
string , number , date , yesno , etc.)
- SQL Blocks: Enhanced syntax highlighting for embedded SQL with Liquid template support
- Comments: Support for
# line comments
- Strings & Numbers: Proper highlighting for quoted strings and numeric values
- Operators: Highlighting for comparison, logical, and arithmetic operators
🔧 Language Features
- Comment Support:
# line comments
- Bracket Matching: Automatic matching for
{} , [] , and ()
- Auto-closing Pairs: Automatic closing of brackets and quotes
- Code Folding: Support for collapsing code blocks
- Indentation: Smart indentation rules for nested structures
Cursor Installation Video
Cursor LookML Extension Installation
Usage
File Association
The extension automatically activates for files with the following extensions:
Example LookML File
Create a new file with .lkml extension and try this example:
view: users {
sql_table_name: public.users ;;
dimension: id {
primary_key: yes
type: number
sql: ${TABLE}.id ;;
}
dimension: name {
type: string
sql: ${TABLE}.name ;;
label: "User Name"
}
measure: count {
type: count
label: "User Count"
drill_fields: [id, name]
}
}
explore: users {
view_name: users
label: "Users Analysis"
}
Troubleshooting
If syntax highlighting is not working:
- Make sure the file has a
.lkml extension
- Try restarting VS Code/Cursor
- Check that the extension is properly installed in the Extensions view
- Verify that the language mode is set to "LookML" in the bottom-right corner of the editor
License
MIT License
| |