[PATCH] D57392: [clangd] Mention indexing in docs.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 7 08:10:54 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE353423: [clangd] Mention indexing in docs. (authored by kadircet, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D57392?vs=185777&id=185781#toc

Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D57392

Files:
  docs/clangd.rst


Index: docs/clangd.rst
===================================================================
--- docs/clangd.rst
+++ docs/clangd.rst
@@ -143,6 +143,25 @@
 :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
 ==================
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57392.185781.patch
Type: text/x-patch
Size: 1266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190207/b458bf25/attachment-0001.bin>


More information about the cfe-commits mailing list