Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-clangd / README.md
1 # coc-clangd
2
3 This extension connects [coc.nvim][] to the [clangd][] language server.
4
5 ## Quick Start
6
7 1. install [Node.js][]. `coc.nvim` and `coc-clangd` run on Node.js.
8 1. install `coc.nvim`. Instructions using `vim-plug` (check out [coc.nvim Wiki][] other options):
9    - add to `.vimrc`: `vim Plug 'neoclide/coc.nvim', {'branch': 'release'}`
10    - in vim, run `:PlugInstall`
11 1. in vim, run `:CocInstall coc-clangd`
12 1. `coc-clangd` will try to find `clangd` from your `$PATH`, if not found, you can run `:CocCommand clangd.install` to install the [latest release][] from GitHub
13 1. follow [Project setup][] to generate `compile_commands.json` for your project
14
15 > **Note**: If you've configured `clangd` as a languageServer in `coc-settings.json`, you should remove it to avoid running clangd twice!
16
17 ## Protocol extensions
18
19 `clangd` supports some [extensions][] that are not in the official [Language Server Protocol specification][lsp].
20
21 `coc-clangd` adds support for:
22
23 - Switching between header and implementation file: `:CocCommand clangd.switchSourceHeader`
24 - File status monitor, shows on NeoVim statusline
25 - Describe symbol under the cursor: `:CocCommand clangd.symbolInfo`
26 - Completions that adjust text near the cursor (e.g. correcting `.` to `->`)
27
28 ## Configurations
29
30 `:CocConfig` opens your global `coc-settings.json`, or `:CocLocalConfig` opens local configuration in your project `.vim/coc-settings.json`.
31
32 - `clangd.enabled`: enable `coc-clangd`, default `true`
33 - `clangd.arguments`: arguments for `clangd` server, default `[]`
34 - `clangd.checkUpdates`: check for clangd language server updates on startup, default `false`
35 - `clangd.disableDiagnostics`: disable diagnostics from clangd, default `false`
36 - `clangd.disableSnippetCompletion`: disable completion snippet from clangd, default `false`
37 - `clangd.compilationDatabasePath`: specifies the directory containing the compilation database, default `''`
38 - `clangd.fallbackFlags`: extra clang flags used to parse files when no compilation database is found, default `[]`
39 - `clangd.path`: path to `clangd` executable, default `clangd`
40 - `clangd.semanticHighlighting`: enable semantic highlighting, requires [jackguo380/vim-lsp-cxx-highlight](https://github.com/jackguo380/vim-lsp-cxx-highlight) to work, default `false`
41 - `clangd.serverCompletionRanking`: always rank compilation items on the server as you type, default `true`
42
43 ## Commands
44
45 - `clangd.switchSourceHeader`: switch between source/header files
46 - `clangd.symbolInfo`: resolve symbol info under the cursor
47 - `clangd.install`: install latest clangd release from GitHub
48 - `clangd.update`: check for updates to clangd from GitHub
49
50 ## License
51
52 Apache 2.0 with LLVM Exception
53
54 This is the [standard LLVM license](https://llvm.org/foundation/relicensing/).
55
56 ---
57
58 > This extension is created by [create-coc-extension](https://github.com/fannheyward/create-coc-extension)
59
60 [node.js]: https://nodejs.org/en/
61 [clangd]: https://clangd.llvm.org/installation.html
62 [coc.nvim]: https://github.com/neoclide/coc.nvim
63 [coc.nvim wiki]: https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim
64 [lsp]: https://microsoft.github.io/language-server-protocol/specification
65 [extensions]: https://clangd.llvm.org/extensions.html
66 [latest release]: https://github.com/clangd/clangd/releases
67 [project setup]: https://clangd.llvm.org/installation.html#project-setup