clang-tools 8.0.0

README.md
Go to the documentation of this file.
1 # vscode-clangd
2
3 Provides C/C++ language IDE features for VS Code using [clangd](https://clang.llvm.org/extra/clangd.html).
4
5 ## Usage
6
7 `vscode-clangd` provides the features designated by the [Language Server
8 Protocol](https://github.com/Microsoft/language-server-protocol), such as
9 code completion, code formatting and goto definition.
10
11 **Note**: `clangd` is under heavy development, not all LSP features are
12 implemented. See [Current Status](https://clang.llvm.org/extra/clangd.html#current-status)
13 for details.
14
15 To use `vscode-clangd` extension in VS Code, you need to install `vscode-clangd`
16 from VS Code extension marketplace.
17
18 `vscode-clangd` will attempt to find the `clangd` binary on your `PATH`.
19 Alternatively, the `clangd` executable can be specified in your VS Code
20 `settings.json` file:
21
22 ```json
23 {
24 "clangd.path": "/absolute/path/to/clangd"
25 }
26 ```
27
28 To obtain `clangd` binary, please see the [installing Clangd](https://clang.llvm.org/extra/clangd.html#installing-clangd).
29
30 ## Development
31
32 A guide of developing `vscode-clangd` extension.
33
34 ### Requirements
35
36 * VS Code
37 * node.js and npm
38
39 ### Steps
40
41 1. Make sure you disable the installed `vscode-clangd` extension in VS Code.
42 2. Make sure you have clangd in /usr/bin/clangd or edit src/extension.ts to
43 point to the binary.
44 3. In order to start a development instance of VS code extended with this, run:
45
46 ```bash
47 $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
48 $ npm install
49 $ code .
50 # When VS Code starts, press <F5>.
51 ```
52
53 ## Publish to VS Code Marketplace
54
55 New changes to `clangd-vscode` are not released until a new version is published
56 to the marketplace.
57
58 ### Requirements
59
60 * Make sure install the `vsce` command (`npm install -g vsce`)
61 * `llvm-vs-code-extensions` account
62 * Bump the version in `package.json`, and commit the change to upstream
63
64 The extension is published under `llvm-vs-code-extensions` account, which is
65 currently maintained by clangd developers. If you want to make a new release,
66 please contact cfe-dev@lists.llvm.org.
67
68 ### Steps
69
70 ```bash
71 $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
72 # For the first time, you need to login in the account. vsce will ask you for
73 the Personal Access Token, and remember it for future commands.
74 $ vsce login llvm-vs-code-extensions
75 $ vsce publish
76 ```