clang-tools  10.0.0
DEVELOPING.md
Go to the documentation of this file.
1 # Development
2 
3 A guide of developing `vscode-clangd` extension.
4 
5 ## Requirements
6 
7 * VS Code
8 * node.js and npm
9 
10 ## Steps
11 
12 1. Make sure you disable the installed `vscode-clangd` extension in VS Code.
13 2. Make sure you have clangd in /usr/bin/clangd or edit src/extension.ts to
14 point to the binary.
15 3. In order to start a development instance of VS code extended with this, run:
16 
17 ```bash
18  $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
19  $ npm install
20  $ code .
21  # When VS Code starts, press <F5>.
22 ```
23 
24 # Contributing
25 
26 Please follow the exsiting code style when contributing to the extension, we
27 recommend to run `npm run format` before sending a patch.
28 
29 # Publish to VS Code Marketplace
30 
31 New changes to `clangd-vscode` are not released until a new version is published
32 to the marketplace.
33 
34 ## Requirements
35 
36 * Make sure install the `vsce` command (`npm install -g vsce`)
37 * `llvm-vs-code-extensions` account
38 * Bump the version in `package.json`, and commit the change to upstream
39 
40 The extension is published under `llvm-vs-code-extensions` account, which is
41 currently maintained by clangd developers. If you want to make a new release,
42 please contact clangd-dev@lists.llvm.org.
43 
44 ## Steps
45 
46 ```bash
47  $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
48  # For the first time, you need to login in the account. vsce will ask you for
49  the Personal Access Token, and remember it for future commands.
50  $ vsce login llvm-vs-code-extensions
51  # Publish the extension to the VSCode marketplace.
52  $ npm run publish
53 ```