All contributions are welcome!
-
Install prerequisites:
- latest Visual Studio Code
- Node.js v12.0.0 or higher
-
Fork and clone this repository and go into the folder
$ cd vscode-yaml -
Install the dependencies
$ npm install
-
Compile the Typescript to Javascript
$ npm run compile
- Open the client in vscode
- Make changes as neccessary and the run the code using F5
-
Download both the Yaml Language Server and this VSCode Yaml Client.
-
Create a project with the directories in the following structure.
ParentFolder/
├──── vscode-yaml/
├──── yaml-language-server/
-
Run
yarn installin both directories to initializenode_modulesdependencies. -
In
vscode-yaml/src/extension.tsset theserverModulevariable to:serverModule = context.asAbsolutePath(path.join("..", "yaml-language-server", "out", "server", "src", "server.js"));
This will redirect which YAML LS to use.
-
In BOTH directories run:
yarn run compile
-
To run the language server in VSCode, click
View -> Debug, then from the drop down menu beside the green arrow selectLaunch Extension (vscode-yaml), click the arrow, and a new VSCode window should load with the YAML LS running. -
To debug the language server in VSCode, from the same drop down menu select
Attach (yaml-language-server), and click the green arrow to start. Ensure you've opened a YAML file or else the server would have not yet started.
Note: Disable or remove any existing implementations of the YAML Language server from VSCode or there will be conflicts.
- To develop the language server visit https://github.com/redhat-developer/yaml-language-server
Refer to VS Code documentation on how to run and debug the extension
To obtain and install the latest release from github you can:
- First download the latest *.vsix file from Github Releases section
- Inside of VSCode navigate to the extension tab and click the three elipses (...).
- Click install from VSIX and provide the location of the *.vsix that was downloaded