sammccall updated this revision to Diff 218437.
sammccall added a comment.

mention rename


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67092/new/

https://reviews.llvm.org/D67092

Files:
  clang-tools-extra/clangd/clients/clangd-vscode/DEVELOPING.md
  clang-tools-extra/clangd/clients/clangd-vscode/README.md
  clang-tools-extra/clangd/clients/clangd-vscode/complete.png
  clang-tools-extra/clangd/clients/clangd-vscode/diagnostics.png
  clang-tools-extra/clangd/clients/clangd-vscode/extract.png
  clang-tools-extra/clangd/clients/clangd-vscode/format.png
  clang-tools-extra/clangd/clients/clangd-vscode/include.png
  clang-tools-extra/clangd/clients/clangd-vscode/symbolsearch.png
  clang-tools-extra/clangd/clients/clangd-vscode/xrefs.png

Index: clang-tools-extra/clangd/clients/clangd-vscode/README.md
===================================================================
--- clang-tools-extra/clangd/clients/clangd-vscode/README.md
+++ clang-tools-extra/clangd/clients/clangd-vscode/README.md
@@ -1,81 +1,103 @@
 # vscode-clangd
 
-Provides C/C++ language IDE features for VS Code using [clangd](https://clang.llvm.org/extra/clangd.html).
+Provides C/C++ language IDE features for VS Code using [clangd](https://clang.llvm.org/extra/clangd.html):
 
-## Usage
+ - code completion
+ - compile errors and warnings
+ - go-to-definition and cross references
+ - include management
+ - code formatting
+ - simple refactorings
 
-`vscode-clangd` provides the features designated by the [Language Server
-Protocol](https://github.com/Microsoft/language-server-protocol), such as
-code completion, code formatting and goto definition.
+## Setup
 
-**Note**: `clangd` is under heavy development, not all LSP features are
-implemented. See [Current Status](https://clang.llvm.org/extra/clangd/Features.html#complete-list-of-features)
-for details.
+### `clangd` server
 
-To use `vscode-clangd` extension in VS Code, you need to install `vscode-clangd`
-from VS Code extension marketplace.
+`clangd` is a language server that must be installed separately, see
+[https://clangd.github.io/installation.html](getting started).
+The vscode-clangd plugin will look for `clangd` on your PATH (you can change
+this in the settings).
 
-`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:
+### Project setup
 
-```json
-{
-    "clangd.path": "/absolute/path/to/clangd"
-}
-```
+clangd is based on the clang C++ compiler, and understands even complex C++
+code.  However, you must tell clangd how your project is built (compile flags).
+[A `compile_commands.json` file](http://clang.llvm.org/docs/JSONCompilationDatabase.html)
+can usually be generated by your build system
+(e.g. by setting `-DCMAKE_EXPORT_COMPILE_COMMANDS=1` when building with CMake,
+or with
+[many other tools](https://sarcasm.github.io/notes/dev/compilation-database.html)).
 
-To obtain `clangd` binary, please see the [installing Clangd](https://clang.llvm.org/extra/clangd/Installation.html#installing-clangd).
+It should live at the top of your source tree: symlink or copy it there.
 
-## Development
+## Features
 
-A guide of developing `vscode-clangd` extension.
+### Code completion
 
-### Requirements
+Suggestions will appear as you type names, or after `.` or `->`.
+Because clangd uses a full C++ parser, code completion has access to precise
+type information.
 
-* VS Code
-* node.js and npm
+![Code completion](complete.png)
 
-### Steps
+### Errors, warnings, and clang-tidy
 
-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:
+Code errors are shown as you type (both as red squiggle underlines, and in the
+"Problems" panel). These are the same as produced by the clang compiler, and
+suggested fixes can automatically be applied.
 
-```bash
-   $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
-   $ npm install
-   $ code .
-   # When VS Code starts, press <F5>.
-```
+![Error with fix](diagnostics.png)
 
-## Contributing
+Most clang-tidy checks are supported (these can be enabled using a [.clang-tidy
+file](https://clang.llvm.org/extra/clang-tidy/)).
 
-Please follow the exsiting code style when contributing to the extension, we
-recommend to run `npm run format` before sending a patch.
+### Cross-references
 
-## Publish to VS Code Marketplace
+Go-to-definition and find-references work across your code, using a project-wide
+index.
 
-New changes to `clangd-vscode` are not released until a new version is published
-to the marketplace.
+![Cross-reference list](xrefs.png)
 
-### Requirements
+Press `Ctrl-P #` to quickly navigate to a symbol by name.
 
-* 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
+### Include management
 
-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 clangd-...@lists.llvm.org.
+Code completion works across your codebase and adds `#include` directives where
+needed. The `&bull;` shows includes that will be inserted.
 
-### Steps
+clangd can also suggest inserting missing #includes, where they cause errors.
 
-```bash
-  $ 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
-```
+![Fix inserts include](include.png)
+
+### Formatting
+
+clangd uses the `clang-format` engine. You can format a file or the selection.
+When "Format on Type" is enabled in the settings, pressing enter will cause
+clangd to format the old line and semantically reindent.
+
+![Format-on-type](format.png)
+
+The style used for formatting (and certain other operations) is controlled by
+the .clang-format file is controlled by the project's
+[.clang-format file](https://clang.llvm.org/docs/ClangFormatStyleOptions.html).
+
+### Refactoring
+
+clangd supports some local refactorings. When you select an expression or
+declaration, the lightbulb menu appears and you can choose a code action.
+
+![Extract variable code action](extract.png)
+
+Current refactorings include:
+ - extract variable/function
+ - expand `auto` types and macros
+ - use raw strings
+ - rerame (bound to `<F2>`, rather than a contextual code action)
+
+## Bugs/contributing
+
+clangd and vscode-clangd are part of the [LLVM project](https://llvm.org).
+
+If you'd like to help out, reach out to clangd-...@lists.llvm.org.
+
+If you've found a bug, please file at https://github.com/clangd/clangd/issues.
Index: clang-tools-extra/clangd/clients/clangd-vscode/DEVELOPING.md
===================================================================
--- clang-tools-extra/clangd/clients/clangd-vscode/DEVELOPING.md
+++ clang-tools-extra/clangd/clients/clangd-vscode/DEVELOPING.md
@@ -1,42 +1,13 @@
-# vscode-clangd
-
-Provides C/C++ language IDE features for VS Code using [clangd](https://clang.llvm.org/extra/clangd.html).
-
-## Usage
-
-`vscode-clangd` provides the features designated by the [Language Server
-Protocol](https://github.com/Microsoft/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](https://clang.llvm.org/extra/clangd/Features.html#complete-list-of-features)
-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:
-
-```json
-{
-    "clangd.path": "/absolute/path/to/clangd"
-}
-```
-
-To obtain `clangd` binary, please see the [installing Clangd](https://clang.llvm.org/extra/clangd/Installation.html#installing-clangd).
-
-## Development
+# Development
 
 A guide of developing `vscode-clangd` extension.
 
-### Requirements
+## Requirements
 
 * VS Code
 * node.js and npm
 
-### Steps
+## 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
@@ -50,17 +21,17 @@
    # When VS Code starts, press <F5>.
 ```
 
-## Contributing
+# 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
+# Publish to VS Code Marketplace
 
 New changes to `clangd-vscode` are not released until a new version is published
 to the marketplace.
 
-### Requirements
+## Requirements
 
 * Make sure install the `vsce` command (`npm install -g vsce`)
 * `llvm-vs-code-extensions` account
@@ -68,9 +39,9 @@
 
 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 clangd-...@lists.llvm.org.
+please contact cfe-...@lists.llvm.org.
 
-### Steps
+## Steps
 
 ```bash
   $ cd /path/to/clang-tools-extra/clangd/clients/clangd-vscode/
@@ -79,3 +50,4 @@
   $ vsce login llvm-vs-code-extensions
   $ vsce publish
 ```
+
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to