All contributions are welcome!
-
Install prerequisites:
- latest Visual Studio Code
- Node.js v14.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/
-
Open the
vscode-yaml
folder in VSCode, and then add theyaml-language-server
project to the workspace usingFile -> Add Folder to Workspace...
. -
Run
yarn install
in both directories to initializenode_modules
dependencies. -
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.
Notes:
- Disable or remove any existing implementations of the YAML Language server from VSCode or there will be conflicts.
- If you still have issues you can also try changing the debug port for the language server. To do this change the port in the
Attach to server
configuration to another value inyaml-language-server/.vscode/launch.json
, then change update the port indebugOptions
('--inspect=6009'
) to the new port in the filevscode-yaml/src/node/yamlClientMain.ts
.
- 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
By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the DCO file for details.