PowerShell and Editors

TODO: Mostly about Visual Studio Code

Using PowerShell Editor Services

Installation

To use the PS Editor Services, you need to (a) install the associated module, and (b) install the Visual Studio Code extension (extension: ms-vscode.powershell). There is no easy way to install the associated module (as of 06/2017); you need to clone the repository, and then go to the root and issue the command: Invoke-Build -Task Build. For the compilation to succeed, you need to have a number of pre-reqs installed; read the instructions. You also need to add the subdirectory module in the enviromental variable PSModulePath.

After adding the Visual Studio Code extension, it should work ok, i.e. you should see as terminal PowerShell integrated, which should initialize properly. Observe that this comes with its own profile; hence you can customize it by changing the Microsoft.VSCode_profile.ps1 file. For example, you should import there all modules that use the editor services.

The steps above (except the compilation) are already done in my repo. There is a basic module with sample extensions in Modules/VSCodeExtensionsCG.

Custom extentions

TODO: Add instructions on how to extend.

TODO: Functions that are called by the extensions must be public and be called with the external name.

results matching ""

    No results matching ""