Skip to content

Commit f7be79e

Browse files
committed
Merging r354777, r354778, r354779, r354786, r354865, and r354992
------------------------------------------------------------------------ r354777 | gribozavr | 2019-02-25 13:48:52 +0100 (Mon, 25 Feb 2019) | 9 lines Removed an unhelpful comment in index.rst Reviewers: ilya-biryukov Subscribers: arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58602 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r354778 | gribozavr | 2019-02-25 13:49:27 +0100 (Mon, 25 Feb 2019) | 7 lines Fixed grammar in index.rst Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58601 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r354779 | gribozavr | 2019-02-25 14:03:44 +0100 (Mon, 25 Feb 2019) | 9 lines Updated the documentation build instructions for the current CMake build system Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58603 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r354786 | gribozavr | 2019-02-25 14:43:48 +0100 (Mon, 25 Feb 2019) | 9 lines Moved clangd docs to a separate directory in preparation to restructure them into multiple files Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58607 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r354865 | kadircet | 2019-02-26 12:08:04 +0100 (Tue, 26 Feb 2019) | 11 lines [clangd] Update docs to mention YCM integration and new LSP features Reviewers: gribozavr Reviewed By: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56718 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r354992 | gribozavr | 2019-02-27 16:53:05 +0100 (Wed, 27 Feb 2019) | 13 lines Added more detailed documentation for clangd Summary: The text was written mostly by Sam McCall, screenshots are mostly made by me. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58710 ------------------------------------------------------------------------ llvm-svn: 354997
1 parent 8c0e32b commit f7be79e

26 files changed

+867
-177
lines changed

clang-tools-extra/docs/README.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
-------------------------------------------------------------
2-
Documentation for the tools of clang-tools-extra repo project
3-
-------------------------------------------------------------
1+
----------------------------------
2+
Documentation in clang-tools-extra
3+
----------------------------------
44

5-
Sphinx and doxygen documentation is generated by executing make.
5+
To generate documentation in HTML format from files in clang-tools-extra/docs,
6+
build the docs-clang-tools-html target.
67

7-
Sphinx html files can be generated separately using make html.
8+
To generate documentation from the source code using Doxygen, build the
9+
doxygen-clang-tools target.
810

9-
Doxygen html files can also be generated using make doxygen.
10-
11-
The generated documentation will be placed in _build/html.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
details {
2+
background-color: rgba(50, 150, 220, 0.08);
3+
margin-bottom: 0.5em;
4+
padding: 0 1em;
5+
overflow-y: hidden; /* Suppress margin-collapsing */
6+
}
7+
details[open] {
8+
border-bottom: 1px solid rgba(0, 0, 128, 0.2);
9+
margin-bottom: 1em;
10+
}
11+
details summary {
12+
font-weight: bold;
13+
background-color: rgba(50, 150, 220, 0.1);
14+
border-color: rgba(0, 0, 128, 0.2);
15+
border-width: 1px;
16+
border-style: solid none;
17+
padding: 0.2em;
18+
margin: 0 -1em;
19+
}
20+
details summary:hover {
21+
background-color: rgba(50, 150, 220, 0.2);
22+
cursor: pointer;
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% extends "!layout.html" %}
2+
3+
{% set css_files = css_files + ['_static/clang-tools-extra-styles.css'] %}

clang-tools-extra/docs/clangd.rst

Lines changed: 1 addition & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1 @@
1-
============
2-
Clangd
3-
============
4-
5-
.. contents::
6-
7-
.. toctree::
8-
:maxdepth: 1
9-
10-
:program:`Clangd` is an implementation of the `Language Server Protocol
11-
<https://github.com/Microsoft/language-server-protocol>`_ leveraging Clang.
12-
Clangd's goal is to provide language "smartness" features like code completion,
13-
find references, etc. for clients such as C/C++ Editors.
14-
15-
Using Clangd
16-
==================
17-
18-
:program:`Clangd` is not meant to be used by C/C++ developers directly but
19-
rather from a client implementing the protocol. A client would be typically
20-
implemented in an IDE or an editor.
21-
22-
At the moment, `Visual Studio Code <https://code.visualstudio.com/>`_ is mainly
23-
used in order to test :program:`Clangd` but more clients are likely to make
24-
use of :program:`Clangd` in the future as it matures and becomes a production
25-
quality tool. If you are interested in trying :program:`Clangd` in combination
26-
with Visual Studio Code, you can start by `installing Clangd`_ or
27-
`building Clangd`_, then open Visual Studio Code in the clangd-vscode folder and
28-
launch the extension.
29-
30-
Installing Clangd
31-
==================
32-
33-
Packages are available for debian-based distributions, see the `LLVM packages
34-
page <http://apt.llvm.org/>`_. :program:`Clangd` is included in the
35-
`clang-tools` package.
36-
However, it is a good idea to check your distribution's packaging system first
37-
as it might already be available.
38-
39-
Otherwise, you can install :program:`Clangd` by `building Clangd`_ first.
40-
41-
Building Clangd
42-
==================
43-
44-
You can follow the instructions for `building Clang
45-
<https://clang.llvm.org/get_started.html>`_ but "extra Clang tools" is **not**
46-
optional.
47-
48-
Current Status
49-
==================
50-
51-
Many features could be implemented in :program:`Clangd`.
52-
Here is a list of features that could be useful with the status of whether or
53-
not they are already implemented in :program:`Clangd` and specified in the
54-
Language Server Protocol. Note that for some of the features, it is not clear
55-
whether or not they should be part of the Language Server Protocol, so those
56-
features might be eventually developed outside :program:`Clangd` or as an
57-
extension to the protocol.
58-
59-
+-------------------------------------+------------+----------+
60-
| C/C++ Editor feature | LSP | Clangd |
61-
+=====================================+============+==========+
62-
| Formatting | Yes | Yes |
63-
+-------------------------------------+------------+----------+
64-
| Completion | Yes | Yes |
65-
+-------------------------------------+------------+----------+
66-
| Diagnostics | Yes | Yes |
67-
+-------------------------------------+------------+----------+
68-
| Fix-its | Yes | Yes |
69-
+-------------------------------------+------------+----------+
70-
| Go to Definition | Yes | Yes |
71-
+-------------------------------------+------------+----------+
72-
| Signature Help | Yes | Yes |
73-
+-------------------------------------+------------+----------+
74-
| Document Highlights | Yes | Yes |
75-
+-------------------------------------+------------+----------+
76-
| Rename | Yes | Yes |
77-
+-------------------------------------+------------+----------+
78-
| Source hover | Yes | Yes |
79-
+-------------------------------------+------------+----------+
80-
| Find References | Yes | No |
81-
+-------------------------------------+------------+----------+
82-
| Code Lens | Yes | No |
83-
+-------------------------------------+------------+----------+
84-
| Document Symbols | Yes | Yes |
85-
+-------------------------------------+------------+----------+
86-
| Workspace Symbols | Yes | Yes |
87-
+-------------------------------------+------------+----------+
88-
| Syntax and Semantic Coloring | No | No |
89-
+-------------------------------------+------------+----------+
90-
| Code folding | No | No |
91-
+-------------------------------------+------------+----------+
92-
| Call hierarchy | No | No |
93-
+-------------------------------------+------------+----------+
94-
| Type hierarchy | No | No |
95-
+-------------------------------------+------------+----------+
96-
| Organize Includes | No | No |
97-
+-------------------------------------+------------+----------+
98-
| Quick Assist | No | No |
99-
+-------------------------------------+------------+----------+
100-
| Extract Local Variable | No | No |
101-
+-------------------------------------+------------+----------+
102-
| Extract Function/Method | No | No |
103-
+-------------------------------------+------------+----------+
104-
| Hide Method | No | No |
105-
+-------------------------------------+------------+----------+
106-
| Implement Method | No | No |
107-
+-------------------------------------+------------+----------+
108-
| Gen. Getters/Setters | No | No |
109-
+-------------------------------------+------------+----------+
110-
111-
Editor Integration
112-
==================
113-
114-
Any full-featured Language Server Protocol Client implementation should work
115-
with :program:`Clangd`. This `list
116-
<https://langserver.org/#implementations-client>`_ contains information about
117-
extensions and plugins that are known to work for different editors.
118-
119-
Vim Integration
120-
---------------
121-
122-
LanguageClient-neovim
123-
~~~~~~~~~~~~~~~~~~~~~
124-
125-
One of the options of using :program:`Clangd` in :program:`vim` (or
126-
:program:`nvim`) is to utilize `LanguageClient-neovim
127-
<https://github.com/autozimu/LanguageClient-neovim>`_ plugin. Please see the
128-
`Clangd Wiki page
129-
<https://github.com/autozimu/LanguageClient-neovim/wiki/Clangd>`_ for
130-
instructions.
131-
132-
VSCode Integration
133-
------------------
134-
135-
:program:`VSCode` provides `vscode-clangd
136-
<https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd>`_
137-
which is published in Visual Studio Marketplace and can be installed direcetly
138-
from :program:`VSCode`.
139-
140-
Emacs Integration
141-
-----------------
142-
143-
:program:`Emacs` provides `lsp-mode <github.com/emacs-lsp/lsp-mode>`_ and
144-
`Eglot <https://github.com/joaotavora/eglot>`_ plugins for LSP integration.
145-
146-
Getting Involved
147-
==================
148-
149-
A good place for interested contributors is the `Clangd developer mailing list
150-
<http://lists.llvm.org/mailman/listinfo/clangd-dev>`_. For discussions with the
151-
broader community on topics not only related to Clangd, use
152-
`Clang developer mailing list
153-
<http://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
154-
If you're also interested in contributing patches to :program:`Clangd`, take a
155-
look at the `LLVM Developer Policy
156-
<http://llvm.org/docs/DeveloperPolicy.html>`_ and `Code Reviews
157-
<http://llvm.org/docs/Phabricator.html>`_ page. Contributions of new features
158-
to the `Language Server Protocol
159-
<https://github.com/Microsoft/language-server-protocol>`_ itself would also be
160-
very useful, so that :program:`Clangd` can eventually implement them in a
161-
conforming way.
1+
:orphan:
93 KB
Loading
72.1 KB
Loading
10.2 KB
Loading
19.4 KB
Loading
14.7 KB
Loading
16.6 KB
Loading

0 commit comments

Comments
 (0)