Setting up development environment¶
A demo of the setup can be found on youtube.
It is recommended to work on the forked copy of this repository from your github account to raise pull requests.
Running & debugging the language-server with VS Code¶
- Install dependent packages within ansible-language-server root directory
This will install the dependent modules under
node_modules folder within the
- Clone the repository containing the VS Code extension code into the
vscode-ansibledirectory next to the root directory of this repository.
Open a new VS Code window and add folder to workspace
File -> Add folder to workspaceand add
ansible-language-serverfolders to the workspace
Once the language server and
vscode-ansible/directory is prepared, compile both client and server using command
In the Run and debug window select Client + Server (source) configuration and start debugging
Run -> Start Debugging. This will open up a new VS Code window which is the
Extension development Hostwindow.
Extension development Hostwindow add a new folder that has ansible files.
You can set the ansible-language-server settings by adding
.vscode/settings.jsonfile under the root folder. Example settings:
Cleaning the output¶
If you hit an odd compilation or debugger problem, don't hesitate to clean the
output directory by running
npm run clean under the
You should also run it whenever you are switching between debug/compilation
Building server locally¶
latest Visual Studio Code
Node.js v12.0.0 or higher
Fork and clone this repository
Install the dependencies
- Build the language server
- The newly built server is now located in
Created: November 29, 2022