llvm-project/clang-tools-extra/clangd/clients/clangd-vscode
Haojian Wu bcd4d59a14 [clangd][vscode] Surface the error when applying tweaks fails
Summary:
The current behavior for a failed request is just to log it in the
output panel. When applyTweak fails for whatever reason, users usually don't get
informed (unless they open the output panel and dig the log).

this patch is to surface these errors by prompting up a message diag.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66211

llvm-svn: 368851
2019-08-14 13:38:52 +00:00
..
.vscode
src [clangd][vscode] Surface the error when applying tweaks fails 2019-08-14 13:38:52 +00:00
test [clangd] Loading TokenColorRules as a class mapping the rules to their associated clangd TextMate scope index. 2019-08-14 12:11:58 +00:00
.gitignore [clangd] Update dev dependencies of clangd-vscode 2019-02-06 13:53:24 +00:00
.vscodeignore
LICENSE Update year in license files 2019-01-15 15:10:32 +00:00
README.md [clangd][vscode] clang-format the the extension code. 2019-08-02 14:24:02 +00:00
package-lock.json [clangd] Bump vscode-clangd v0.0.16 2019-07-24 08:14:29 +00:00
package.json [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client. 2019-08-12 13:33:43 +00:00
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

  1. Make sure you disable the installed vscode-clangd extension in VS Code.
  2. Make sure you have clangd in /usr/bin/clangd or edit src/extension.ts to point to the binary.
  3. 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>.

Contributing

Please follow the exsiting code style when contributing to the extension, we recommend to run npm run format before sending a patch.

Publish to VS Code Marketplace

New changes to clangd-vscode are not released until a new version is published to the marketplace.

Requirements

  • Make sure install the vsce command (npm install -g vsce)
  • llvm-vs-code-extensions account
  • Bump the version in package.json, and commit the change to upstream

The extension is published under llvm-vs-code-extensions account, which is currently maintained by clangd developers. If you want to make a new release, please contact cfe-dev@lists.llvm.org.

Steps

  $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
  # For the first time, you need to login in the account. vsce will ask you for
    the Personal Access Token, and remember it for future commands.
  $ vsce login llvm-vs-code-extensions
  $ vsce publish