Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 2.3 KB

DOCS.md

File metadata and controls

69 lines (55 loc) · 2.3 KB

Pest IDE Tools Documentation

This document contains instructions for setting up Pest support for all of the supported editors.

Contents

Config

The method of updating your config is editor specific.

The available options for all editors are:

{
  // Check for updates to the Pest LS binary via crates.io
  "pestIdeTools.checkForUpdates": true,
  // Ignore specific rule names for the unused rules diagnostics (useful for specifying root rules)
  "pestIdeTools.alwaysUsedRuleNames": [
    "rule_one",
    "rule_two"
  ]
}

VSCode

  1. Download the extension.
  2. Await the prompt which will ask you if you want to install a suitable binary, and accept.
  3. Wait for it to install the server.
    • If the server fails to install, you can install it manually using cargo install pest-language-server, then use the configuration pestIdeTools.serverPath to point the extension to the installed binary.
  4. (Optional) You may need to execute the command Pest: Restart server or reload your window for the server to activate.

VSCode Specific Configs

These config options are specific to VSCode.

{
  // Set a custom path to a Pest LS binary
  "pestIdeTools.serverPath": "/path/to/binary",
  // Custom arguments to pass to the Pest LS binary
  "pestIdeTools.customArgs": []
}

Sublime Text

  1. Download the pest.sublime-package file from the latest release's assets page.
    • This gives you syntax highlighting for Pest flies.
  2. Place the downloaded pest.sublime-package file in the path/to/sublime-text/Installed Packages directory.
  3. Install the server using cargo install pest-language-server.
  4. Execute the Preferences: LSP Settings command and add a new key to the clients object.
    // LSP.sublime-settings
    "clients": {
    	"pest": {
    		"enabled": true,
            // This is usually something like /home/username/.cargo/bin/pest-language-server
    		"command": ["/path/to/language/server/binary"],
    		"selector": "source.pest",
    	},
        // ...other LSPs
    }
  5. You may have to restart your Sublime Text to get the LSP to start.