Installation

The extension is distributed as a Visual Studio Extension (.vsix) file. To install the extension,

  1. download the latest version of the .vsix file from https://github.com/apple/pkl-vscode/releases/latest/

  2. follow Install from a VSIX in the VS Code docs.

To confirm that the installation succeeded, open a .pkl file and verify that syntax highlighting works.

Java requirement

The extension currently requires Java 22+ in order to run the Pkl Language Server.

By default, it will look for the Java either in PATH, or in JAVA_HOME.

The path to the Java executable can also be set via the pkl.lsp.java.path setting.

The Java requirement will be removed when the Pkl Language Server is published as a native executable. For more details, see https://github.com/apple/pkl-lsp/issues/60.