Semantic syntax highlighting and navigation for the L++ biological modeling language.
Features
Syntax Highlighting
- Blue: Declaration keywords (
pathway,organ,cell,bacterium,medium, etc.) - Green: Class instances (e.g.,
Nosefromorgan Nose,LBfrommedium LB) - Skyblue: Variables (e.g.,
K_Vrel,title,dimension,H+,5'-deoxyadenosine) - Yellow: Function calls (e.g.,
Infection(...)inreaction Infection(...)) - Purple: Kinetic parameters (
k,kr,km,ki,vand their_functionvariants likek_function,kr_function) - Light green: Numbers and units (e.g.,
55 M,3.48 mM,800 km) - Light purple: File/folder paths in dotted references (e.g.,
TreeOfLife.Bacteria.Ecoli.MediuminTreeOfLife.Bacteria.Ecoli.Medium.LB)
Declaration Tracking
The extension tracks variable and class instance declarations across entire files and colors all uses appropriately:
- Explicit keyword declarations:
organ Nose,float temperature,pathway myp - Bare-brace declarations:
Core { ... } - Import aliases:
TreeOfLife.Bacteria.Ecoli Ecoli - Dotted filepath references with cross-file resolution:
TreeOfLife.Bacteria.Ecoli.Medium.LB
Code Navigation
Hover information: Hover over any variable or class instance to see whether it's a class instance or variable, plus the declaration line number.
Go to definition: Cmd+Click (Mac) or Ctrl+Click (Windows/Linux) to jump to the line where a symbol is declared.
Dotted path navigation: Hover over or click any segment in a dotted path like TreeOfLife.Bacteria.Ecoli.Metabolism.MetaboliteConcentrations.Cytoplasm:
- Intermediate segments reveal their folders in Explorer
- Leaf symbols jump to declarations
Compound Names
Multi-part names connected by hyphens or commas are treated as single tokens:
L-alanine,D-glucose,5,6,7,8-tetrahydrofolaterender as atomic units- Ion notation:
H+,HCO3-,NH4+ - Apostrophe support:
5'-deoxyadenosine,alpha-D-ribose-5-phosphate - Scientific notation (e.g.,
1e-5) is recognized as a number, not a compound
Extension Settings
File Icon Theme (Recommended)
The L++ extension includes a complete icon theme that combines:
- Custom L++ icon for
.lppfiles (blue "L" mark) - Full Seti theme for all other file types (Python, JavaScript, JSON, TypeScript, Rust, etc.)
To enable:
- Open the Command Palette (
Cmd+Shift+Pon Mac,Ctrl+Shift+Pon Windows/Linux) - Select Preferences: File Icon Theme
- Choose L++ File Icons
This gives you the complete Seti icon set plus L++'s distinctive file marker for .lpp files.
Example
person S
{
disease_state = Susceptible
count = 600000
}
// S is green (person S)
// disease_state is skyblue (variable)
// count is skyblue (variable)
reaction Infection(S -> I, k = 0.178)
// Infection is yellow (function call)
// k is purple (kinetic parameter)
Language Support
This extension adds syntax highlighting and semantic analysis for files with the .lpp extension, recognized as the L++ language.
For more information about L++ and LifeCode, visit the LifeCode repository.