Actualizacion maquina principal
[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 - `clangd.enabled`: enable `coc-clangd`, default `true`
31 - `clangd.arguments`: arguments for `clangd` server, default `[]`
32 - `clangd.checkUpdates`: check for clangd language server updates on startup, default `false`
33 - `clangd.disableDiagnostics`: disable diagnostics from clangd, default `false`
34 - `clangd.disableSnippetCompletion`: disable completion snippet from clangd, default `false`
35 - `clangd.fallbackFlags`: extra clang flags used to parse files when no compilation database is found., default `[]`
36 - `clangd.path`: path to `clangd` executable, default `clangd`
37 - `clangd.semanticHighlighting`: enable semantic highlighting, requires [jackguo380/vim-lsp-cxx-highlight](https://github.com/jackguo380/vim-lsp-cxx-highlight) to work, default `false`
38
39 ## Commands
40
41 - `clangd.switchSourceHeader`: switch between source/header files
42 - `clangd.symbolInfo`: resolve symbol info under the cursor
43 - `clangd.install`: install latest clangd release from GitHub
44 - `clangd.update`: check for updates to clangd from GitHub
45
46 ## License
47
48 Apache 2.0 with LLVM Exception
49
50 This is the [standard LLVM license](https://llvm.org/foundation/relicensing/).
51
52 ---
53
54 > This extension is created by [create-coc-extension](https://github.com/fannheyward/create-coc-extension)
55
56 [node.js]: https://nodejs.org/en/
57 [clangd]: https://clangd.llvm.org/installation.html
58 [coc.nvim]: https://github.com/neoclide/coc.nvim
59 [coc.nvim wiki]: https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim
60 [lsp]: https://microsoft.github.io/language-server-protocol/specification
61 [extensions]: https://clangd.llvm.org/extensions.html
62 [latest release]: https://github.com/clangd/clangd/releases
63 [project setup]: https://clangd.llvm.org/installation.html#project-setup