forked from OSchip/llvm-project
7093860aac
Summary: Previously, we use a separate GitHub repository (https://github.com/llvm-vs-code-extensions/vscode-clangd) for publishing `vscode-clangd` extension to marketplace. To reduce the maintain burden, we will use the vscode extension in the clang-tools-extra, and deprecate the one on GitHub. Test in https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.clangd-vscode-test Reviewers: sammccall, krasimir Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41391 llvm-svn: 321252 |
||
---|---|---|
.. | ||
.vscode | ||
src | ||
test | ||
.gitignore | ||
.vscodeignore | ||
LICENSE | ||
README.md | ||
package.json | ||
tsconfig.json | ||
vsc-extension-quickstart.md |
README.md
vscode-clangd
Provides C/C++ language IDE features for VS Code using clangd.
Usage
vscode-clangd
provides the features designated by the Language Server
Protocol, such as
code completion, code formatting and goto definition.
Note: clangd
is under heavy development, not all LSP features are
implemented. See Current Status
for details.
To use vscode-clangd
extension in VS Code, you need to install vscode-clangd
from VS Code extension marketplace.
vscode-clangd
will attempt to find the clangd
binary on your PATH
.
Alternatively, the clangd
executable can be specified in your VS Code
settings.json
file:
{
"clangd.path": "/absolute/path/to/clangd"
}
To obtain clangd
binary, please see the installing Clangd.
Development
A guide of developing vscode-clangd
extension.
Requirements
- VS Code
- node.js and npm
Steps
- Make sure you disable the installed
vscode-clangd
extension in VS Code. - Make sure you have clangd in /usr/bin/clangd or edit src/extension.ts to point to the binary.
- In order to start a development instance of VS code extended with this, run:
$ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
$ npm install
$ code .
# When VS Code starts, press <F5>.