summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2019-02-07 16:10:39 +0000
committerKadir Cetinkaya <kadircet@google.com>2019-02-07 16:10:39 +0000
commitb88144e4babdb1acc2694010de377f826242e731 (patch)
treebe6786b4c9510b3fac31f660f77c0eb65e54d0e2
parentee23633eab7254c762422778bfccd61b9f659b30 (diff)
downloadbcm5719-llvm-b88144e4babdb1acc2694010de377f826242e731.tar.gz
bcm5719-llvm-b88144e4babdb1acc2694010de377f826242e731.zip
[clangd] Mention indexing in docs.
Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57392 llvm-svn: 353423
-rw-r--r--clang-tools-extra/docs/clangd.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/clangd.rst b/clang-tools-extra/docs/clangd.rst
index 84696e3bb8d..0843bcaf85e 100644
--- a/clang-tools-extra/docs/clangd.rst
+++ b/clang-tools-extra/docs/clangd.rst
@@ -143,6 +143,25 @@ Emacs Integration
:program:`Emacs` provides `lsp-mode <github.com/emacs-lsp/lsp-mode>`_ and
`Eglot <https://github.com/joaotavora/eglot>`_ plugins for LSP integration.
+Project-wide Index
+==================
+
+By default :program:`Clangd` only has a view on symbols coming from files you
+are currently editing. You can extend this view to whole project by providing a
+project-wide index to :program:`Clangd`.
+
+There are two ways you can generate a project-wide index for clangd:
+
+- Passing experimental `-background-index` commandline argument, which will
+ incrementally build an index of projects that you work on and make use of that
+ in clangd automatically.
+- Generate an index file using `clangd-indexer
+ <https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/indexer/IndexerMain.cpp>`_
+ Afterwards you can pass generated index file to clangd using
+ `-index-file=/path/to/index_file`. *Note that clangd-indexer isn't included
+ alongside clangd in the standard clang-tools package. You will likely have to
+ build from source to use this option*
+
Getting Involved
==================
OpenPOWER on IntegriCloud