Pkl IDE Support
formae uses Pkl as its primary configuration language. Pkl provides type-safe, programmable infrastructure definitions with excellent IDE support.
Install Java (required for Pkl language server)
Pkl tooling requires Java to run. We recommend using SDKMAN! to manage Java installations, as it allows you to easily switch between multiple Java versions.
Option A: Install Java with SDKMAN! (recommended)
-
Install SDKMAN!:
curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh"
-
Install Java:
sdk install java
-
Verify installation:
java --version
Option B: Install Java directly
macOS:
brew install openjdk
Linux:
Download and install OpenJDK from https://jdk.java.net/24/, then ensure the java
binary is in your PATH.
Configure your editor
Choose your preferred editor for working with Pkl:
VSCode
Install the official Pkl extension for VSCode:
- Visit the Pkl VSCode installation guide
- Install the extension from the VSCode marketplace
Neovim
Install Pkl support for Neovim using your plugin manager:
Using lazy.nvim:
{
'apple/pkl-neovim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
build = function()
vim.cmd('TSInstall! pkl')
end,
ft = 'pkl',
}
Using vim-plug:
Plug 'apple/pkl-neovim'
Plug 'nvim-treesitter/nvim-treesitter'
After installation, run :TSInstall pkl
to install the Pkl Tree-sitter parser.
Familiarize yourself with Pkl
If you're new to Pkl, we recommend completing our Pkl primer, which covers the fundamentals in just a few minutes. Pkl's syntax is straightforward and designed for efficiency.
Key concepts you'll learn:
- Basic Pkl syntax and structure
- Working with types and validation
- Using modules and imports