Initial approach to extensible semantic highlighting

Fixes #1001989