> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formae.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Pkl in your editor

> Install the Pkl language server and editor support so writing formae is type-checked and autocompleted.

formae uses [Pkl](https://pkl-lang.org/) as its configuration language. Pkl has
strong editor support (type checking, autocomplete, go-to-definition), which makes
writing formae far easier. This guide gets it working in your editor.

<Steps>
  <Step title="Install Java">
    The Pkl language server runs on Java, so you need a JDK installed.

    <Tabs>
      <Tab title="SDKMAN (recommended)">
        SDKMAN lets you manage and switch between Java versions easily.

        ```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
        curl -s "https://get.sdkman.io" | bash
        source "$HOME/.sdkman/bin/sdkman-init.sh"
        sdk install java
        ```

        Verify:

        ```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
        java --version
        ```
      </Tab>

      <Tab title="macOS (Homebrew)">
        ```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
        brew install openjdk
        ```
      </Tab>

      <Tab title="Linux (direct)">
        Download and install OpenJDK from
        [jdk.java.net](https://jdk.java.net/24/), then make sure the `java` binary
        is on your `PATH`.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Add Pkl support to your editor">
    <Tabs>
      <Tab title="VS Code">
        Install the official Pkl extension:

        1. Open the [Pkl VS Code installation guide](https://pkl-lang.org/vscode/current/installation.html).
        2. Install the extension from the VS Code Marketplace.
      </Tab>

      <Tab title="Neovim">
        Install Pkl support with your plugin manager.

        Using [lazy.nvim](https://github.com/folke/lazy.nvim):

        ```lua theme={"languages":{"custom":["/languages/pkl.json"]}}
        {
          'apple/pkl-neovim',
          dependencies = {
            'nvim-treesitter/nvim-treesitter',
          },
          build = function()
            vim.cmd('TSInstall! pkl')
          end,
          ft = 'pkl',
        }
        ```

        Using [vim-plug](https://github.com/junegunn/vim-plug):

        ```vim theme={"languages":{"custom":["/languages/pkl.json"]}}
        Plug 'apple/pkl-neovim'
        Plug 'nvim-treesitter/nvim-treesitter'
        ```

        After installing, run `:TSInstall pkl` to install the Pkl Tree-sitter
        parser.
      </Tab>
    </Tabs>
  </Step>
</Steps>

## New to Pkl?

If you're new to the language, the [Pkl primer](https://pkl.platform.engineering)
covers the fundamentals in a few minutes: basic syntax and structure, types and
validation, and modules and imports. See also the
[Pkl cheatsheet](/documentation/reference/pkl-cheatsheet) for a quick syntax
reference.
