Skip to content
Visual Studio Code syntax highlighting for time zone database files (a.k.a. zoneinfo files)
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
images
src
syntaxes
test
.editorconfig
.gitignore
.vscodeignore
CHANGELOG.md
LICENSE
README.md
language-configuration.json
package.json
tsconfig.json

README.md

VSCode zoneinfo

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.

Installation

Find it as Zoneinfo in the Visual Studio Marketplace. Within VSCode you can search for Zoneinfo in the extensions sidebar.

Syntax highlighting

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

Example screenshot

Preview of syntax highlighted file

Definition navigation

This plugin provides support for smart navigation within the time zone definition files (listed above).

Go to symbol

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:

Example of using the “go to document symbol” feature

Find symbols within the tz directory/workspace:

Example of using the “go to workspace symbol” feature

Go to definition

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.

Example of using the “go to definition” feature

Find all references

This is the reverse operation of “go to definition”. Find all references across the workspace to a Rule or Zone definition.

Example of using the “find all references” feature

Development

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.

Credits

This code is open source under the MIT license – © Gilmore Davidson.

You can’t perform that action at this time.