<commit_before># [Puppet](https://www.puppet.com) extension for Visual Studio Code

[![Version](https://vsmarketplacebadge.apphb.com/version-short/jpogran.puppet-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode)
[![Installs](https://vsmarketplacebadge.apphb.com/installs/jpogran.puppet-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode)
[![Appveyor](https://ci.appveyor.com/api/projects/status/8ke8fhdt9a7j688m/branch/master?svg=true)](https://ci.appveyor.com/project/lingua-pupuli/puppet-vscode/branch/master)
[![Travis Ci](https://travis-ci.org/lingua-pupuli/puppet-vscode.svg?branch=master)](https://travis-ci.org/lingua-pupuli/puppet-vscode)

## Table of Contents

- [Quick Start](#quick-start)
- [Features](#features)
- [Requirements](#requirements)
- [Platform Support](#platform-support)
- [Usage](#usage) 
  - [Syntax highlighting](#syntax-highlighting)
  - [Auto completion](#auto-completion)
  - [Hover Support](#hover-support)
  - [Outline View](#outline-view)
  - [Breadcrumbs](#breadcrumbs)
  - [Go to Symbol](#go-to-symbol)
    [Open Symbol by Name](#open-symbol-by-name)
  - [Code Snippets](#code-snippets)
  - [Linting](#linting)
  - [Live Workspace Intellisense](#live-workspace-intellisense)
  - [Puppet Commands](#puppet-commands)
    - [Puppet Resource](#puppet-resource)
    - [Puppet Node Graph](#puppet-node-graph-preview)
  - [Puppet Development Kit Support](#puppet-development-kit-support)
    - [PDK Supported Versions](#pdk-supported-versions)
    - [PDK New Module](#pdk-new-module)
    - [PDK New Class](#pdk-new-class)
    - [PDK Validate](#pdk-validate)
    - [PDK Test Unit](#pdk-test-unit)
  - [Puppet Bolt Support](#puppet-bolt-support)
  - [Debugging Puppet manifests](#debugging-puppet-manifests)
  - [Docker Language Server Support](#docker-language-server-support)
- [Installing the Extension](#installing-the-extension)
- [Configuration](#configuration)
- [Experience a Problem?](#experience-a-problem)
  - [Puppet Agent Install](#puppet-agent-install)
  - [Reloading the Puppet VSCode extension](#reloading-the-puppet-vscode-extension)
- [Reporting Problems](#reporting-problems)
- [Maintainers](#maintainers)
- [Telemetry](#telemetry)
- [License](#license)

## Quick start

- Step 1: Install a supported version of the Puppet Development Kit on your system (see [Requirements](#requirements) for more information).
- Step 2: Install the Puppet [extension](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode) for Visual Studio Code.
- Step 3: Open or create a Puppet manifest file (a file with a `.pp` or `.epp` extension or named `Puppetfile`) and start automating!

## Features

A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that provides rich support for the [Puppet](https://www.puppet.com) language, including features such as syntax highlighting, linting, debugging, IntelliSense and more.

This extension provides full Puppet Language support for [Visual Studio Code](https://code.visualstudio.com/).

- Syntax highlighting
- IntelliSense for resources, parameters and more
- Outline View
- Breadcrumbs
- Go to Symbol
- Open Symbol by Name
- Linting
- Live Workspace Intellisense
- Code snippets
- Go to Definition of functions, types and classes
- Validation of `metadata.json` files
- Import from `puppet resource` directly into manifests
- Node graph preview
- Puppet Development Kit integration
- (Experimental) Local debugging of Puppet manifests
- (Experimental) Docker Language Server support

**It is currently in technical preview, so that we can gather bug reports and find out what new features to add.**

## Requirements

You will need to have the [Puppet Agent](https://puppet.com/docs/puppet/4.10/about_agent.html)  or [Puppet Development Kit (PDK)](https://puppet.com/docs/pdk/1.x/pdk.html) installed in order to fully use this extension.

> Note: PDK version 1.5.0 or higher is required.

You can find instructions and installation links here:

### PDK

* [Download page](https://puppet.com/download-puppet-development-kit)

### Puppet-Agent

* [Windows](https://docs.puppet.com/puppet/latest/install_windows.html)
* [MacOSX](https://docs.puppet.com/puppet/latest/install_osx.html)
* [Linux](https://docs.puppet.com/puppet/latest/install_linux.html)

## Platform support

- Microsoft Windows
- MacOSX
- Linux

## Usage

### Loading indicator

The Puppet extension includes additional information in the form of a tooltip which describes the features that are loaded and still loading during startup.

![loading_status](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/loading_status.gif)


### Syntax Highlighting

Syntax highlighting recognizes all versions of Puppet and displays as you type.

- Puppet DSL
- Puppet Grammar
- Module metadata files

![syntax_highlighting](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/syntax_highlighting.png)

### Auto Completion

Auto complete Puppet types and classes and their parameter sets as you type. Tab completion works as you would expect.

![auto_complete](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/auto_complete.gif)

### Hover Support

Hovering over any resource, class declaration or other Puppet symbol provides instant contextual information. For example, hovering over the resource declaration lists the type name and parameter list, with all relevant help text.

![hover_support](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/hover_support.gif)

### Outline View

The new `Outline View` shows the symbol tree of the currently selected Puppet manifest. 

Supported symbols:

- Class
- Defined Type
- Attribute
- Variable

More symbols are planned to be added.

> Note: Puppet 4 is not supported for symbols

![outline_view](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/outline_view.gif)

### Breadcrumbs

When the `breadcrumbs.enabled` setting is set to true, both the file path and the symbol tree hierarchy are shown in the Breadcrumb view.

> Note: Puppet 4 is not supported for symbols

![breadcrumbs](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/breadcrumbs.gif)

### Go to Symbol

Opening the `Command Palette` and typing the `@` symbol initiates the `Go to Symbol` view which allows you to navigate around inside a Puppet manifest more quickly.

> Note: Puppet 4 is not supported for symbols

![go_to_symbol](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/go_to_symbol.gif)

### Open Symbol by Name

Pressing `Ctrl+T` (or ⌘T on OSX) will list all [Puppet Custom Types](https://puppet.com/docs/puppet/latest/custom_types.html), [Functions](https://puppet.com/docs/puppet/latest/lang_write_functions_in_puppet.html), [Classes](https://puppet.com/docs/puppet/latest/lang_classes.html) and [Defined Types](https://puppet.com/docs/puppet/latest/lang_defined_types.html) in the workspace. You can then [navigate to the symbol](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name) by pressing `Enter`.

### Code Snippets

As part of IntelliSense and Snippets, you can quickly create templates to automate repetitive series of code.

### Linting

Linting is automatically applied to the document as you edit, without having to save the file first. The validation uses [puppet-lint](https://github.com/rodjek/puppet-lint) to validate the Puppet syntax in all open puppet files. Errors and warnings appear in the Problems window in VSCode.
<commit_msg>(GH-507)(GH-508) Document Puppet Version Support<commit_after># [Puppet](https://www.puppet.com) extension for Visual Studio Code

[![Version](https://vsmarketplacebadge.apphb.com/version-short/jpogran.puppet-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode)
[![Installs](https://vsmarketplacebadge.apphb.com/installs/jpogran.puppet-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode)
[![Appveyor](https://ci.appveyor.com/api/projects/status/8ke8fhdt9a7j688m/branch/master?svg=true)](https://ci.appveyor.com/project/lingua-pupuli/puppet-vscode/branch/master)
[![Travis Ci](https://travis-ci.org/lingua-pupuli/puppet-vscode.svg?branch=master)](https://travis-ci.org/lingua-pupuli/puppet-vscode)

## Table of Contents

- [Quick Start](#quick-start)
- [Features](#features)
- [Requirements](#requirements)
- [Platform Support](#platform-support)
- [Usage](#usage) 
  - [Syntax highlighting](#syntax-highlighting)
  - [Auto completion](#auto-completion)
  - [Hover Support](#hover-support)
  - [Outline View](#outline-view)
  - [Breadcrumbs](#breadcrumbs)
  - [Go to Symbol](#go-to-symbol)
    [Open Symbol by Name](#open-symbol-by-name)
  - [Code Snippets](#code-snippets)
  - [Linting](#linting)
  - [Live Workspace Intellisense](#live-workspace-intellisense)
  - [Puppet Commands](#puppet-commands)
    - [Puppet Resource](#puppet-resource)
    - [Puppet Node Graph](#puppet-node-graph-preview)
  - [Puppet Development Kit Support](#puppet-development-kit-support)
    - [PDK Supported Versions](#pdk-supported-versions)
    - [PDK New Module](#pdk-new-module)
    - [PDK New Class](#pdk-new-class)
    - [PDK Validate](#pdk-validate)
    - [PDK Test Unit](#pdk-test-unit)
  - [Puppet Bolt Support](#puppet-bolt-support)
  - [Debugging Puppet manifests](#debugging-puppet-manifests)
  - [Docker Language Server Support](#docker-language-server-support)
- [Installing the Extension](#installing-the-extension)
- [Configuration](#configuration)
- [Experience a Problem?](#experience-a-problem)
  - [Puppet Agent Install](#puppet-agent-install)
  - [Reloading the Puppet VSCode extension](#reloading-the-puppet-vscode-extension)
- [Reporting Problems](#reporting-problems)
- [Maintainers](#maintainers)
- [Telemetry](#telemetry)
- [License](#license)

## Quick start

- Step 1: Install a supported version of the Puppet Development Kit on your system (see [Requirements](#requirements) for more information).
- Step 2: Install the Puppet [extension](https://marketplace.visualstudio.com/items?itemName=jpogran.puppet-vscode) for Visual Studio Code.
- Step 3: Open or create a Puppet manifest file (a file with a `.pp` or `.epp` extension or named `Puppetfile`) and start automating!

## Features

A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that provides rich support for the [Puppet](https://www.puppet.com) language, including features such as syntax highlighting, linting, debugging, IntelliSense and more.

This extension provides full Puppet Language support for [Visual Studio Code](https://code.visualstudio.com/).

- Syntax highlighting
- IntelliSense for resources, parameters and more
- Outline View
- Breadcrumbs
- Go to Symbol
- Open Symbol by Name
- Linting
- Live Workspace Intellisense
- Code snippets
- Go to Definition of functions, types and classes
- Validation of `metadata.json` files
- Import from `puppet resource` directly into manifests
- Node graph preview
- Puppet Development Kit integration
- (Experimental) Local debugging of Puppet manifests
- (Experimental) Docker Language Server support

**It is currently in technical preview, so that we can gather bug reports and find out what new features to add.**

## Supported Puppet Versions

The Puppet Extension for VSCode works with Puppet 4 or higher. Some features will be slower or not work on Puppet 4, and are noted in the section for that feature. See [open source Puppet](https://puppet.com/docs/puppet/5.5/about_agent.html) and [Puppet Enterprise](https://puppet.com/docs/pe/2017.3/getting_support_for_pe.html#supported-puppet-enterprise-versions) lifecycle pages for version support details. 

## Requirements

You will need to have the [Puppet Agent](https://puppet.com/docs/puppet/4.10/about_agent.html)  or [Puppet Development Kit (PDK)](https://puppet.com/docs/pdk/1.x/pdk.html) installed in order to fully use this extension.

> Note: PDK version 1.5.0 or higher is required.

You can find instructions and installation links here:

### PDK

* [Download page](https://puppet.com/download-puppet-development-kit)

### Puppet-Agent

* [Windows](https://docs.puppet.com/puppet/latest/install_windows.html)
* [MacOSX](https://docs.puppet.com/puppet/latest/install_osx.html)
* [Linux](https://docs.puppet.com/puppet/latest/install_linux.html)

## Platform support

- Microsoft Windows
- MacOSX
- Linux

## Usage

### Loading indicator

The Puppet extension includes additional information in the form of a tooltip which describes the features that are loaded and still loading during startup.

![loading_status](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/loading_status.gif)


### Syntax Highlighting

Syntax highlighting recognizes all versions of Puppet and displays as you type.

- Puppet DSL
- Puppet Grammar
- Module metadata files

![syntax_highlighting](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/syntax_highlighting.png)

### Auto Completion

Auto complete Puppet types and classes and their parameter sets as you type. Tab completion works as you would expect.

![auto_complete](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/auto_complete.gif)

### Hover Support

Hovering over any resource, class declaration or other Puppet symbol provides instant contextual information. For example, hovering over the resource declaration lists the type name and parameter list, with all relevant help text.

![hover_support](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/hover_support.gif)

### Outline View

The new `Outline View` shows the symbol tree of the currently selected Puppet manifest. 

Supported symbols:

- Class
- Defined Type
- Attribute
- Variable

More symbols are planned to be added.

> Note: Puppet 4 is not supported for symbols

![outline_view](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/outline_view.gif)

### Breadcrumbs

When the `breadcrumbs.enabled` setting is set to true, both the file path and the symbol tree hierarchy are shown in the Breadcrumb view.

> Note: Puppet 4 is not supported for symbols

![breadcrumbs](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/breadcrumbs.gif)

### Go to Symbol

Opening the `Command Palette` and typing the `@` symbol initiates the `Go to Symbol` view which allows you to navigate around inside a Puppet manifest more quickly.

> Note: Puppet 4 is not supported

![go_to_symbol](https://raw.githubusercontent.com/lingua-pupuli/puppet-vscode/master/docs/assets/go_to_symbol.gif)

### Open Symbol by Name

Pressing `Ctrl+T` (or ⌘T on OSX) will list all [Puppet Custom Types](https://puppet.com/docs/puppet/latest/custom_types.html), [Functions](https://puppet.com/docs/puppet/latest/lang_write_functions_in_puppet.html), [Classes](https://puppet.com/docs/puppet/latest/lang_classes.html) and [Defined Types](https://puppet.com/docs/puppet/latest/lang_defined_types.html) in the workspace. You can then [navigate to the symbol](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name) by pressing `Enter`.

> Note: Puppet 4 has limited support

### Code Snippets

As part of IntelliSense and Snippets, you can quickly create templates to automate repetitive series of code.

### Linting

Linting is automatically applied to the document as you edit, without having to save the file first. The validation uses [puppet-lint](https://github.com/rodjek/puppet-lint) to validate the Puppet syntax in all open puppet files. Errors and warnings appear in the Problems window in VSCode.

{'fraction_non_alphanumeric': 0.12030169704588309, 'fraction_numerical': 0.0035197988686360778, 'mean_word_length': 4.995101733232856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 68, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2382318', 'n_tokens_mistral': 5302, 'n_tokens_neox': 5061, 'n_words': 1327}