A Visual Studio Code extension that adds syntax highlighting and smart navigation for IANA time zone database files (a.k.a. zoneinfo files).
Also available as a package for Sublime Text.
Find it as Zoneinfo in the Visual Studio Marketplace. Within VSCode you can search for Zoneinfo
in the extensions sidebar.
Syntax highlighting is provided for the raw time zone definition files:
- africa
- antarctica
- asia
- australasia
- backward
- backzone
- etcetera
- europe
- factory
- northamerica
- pacificnew
- southamerica
- systemv
As well as associated metadata files:
- iso3166.tab
- leap-seconds.list
- leapseconds
- zone.tab
- zone1970.tab
This plugin provides support for smart navigation within the time zone definition files (listed above).
Use the go to symbol feature for a single file, or the whole tz
directory.
“Symbol” here means any Link
, Rule
, or Zone
definition.
Find symbols within a single file:
Find symbols within the tz
directory/workspace:
Click-through support between definitions is handled with the go to definition feature.
Specifically, you are able to go from a Link
to a Zone
, and from a Zone
to a Rule
.
This is the reverse operation of “go to definition”. Find all references across the workspace to a Rule
or Zone
definition.
All multi-line symbols (Rule
and Zone
statements) and comment blocks can be folded to reduce clutter.
The syntax highlighting rules are defined by the zoneinfo.tmLanguage
file, which was generated by the sublime-zoneinfo package.
For consistency, any changes to syntax highlighting should be made in sublime-zoneinfo first, then copied to this extension.
This code is open source under the MIT license – © Gilmore Davidson.