0.30.2 • Published 4 months ago

coc-clangd v0.30.2

Weekly downloads
2,451
License
Apache-2.0 WITH L...
Repository
github
Last release
4 months ago

coc-clangd

This extension connects coc.nvim to the clangd language server.

Quick Start

  1. install Node.js. coc.nvim and coc-clangd run on Node.js.
  2. install coc.nvim. Instructions using vim-plug (check out coc.nvim Wiki other options):
    • add to .vimrc: vim Plug 'neoclide/coc.nvim', {'branch': 'release'}
    • in vim, run :PlugInstall
  3. in vim, run :CocInstall coc-clangd
  4. 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
  5. follow Project setup to generate compile_commands.json for your project

Note: If you've configured clangd as a languageServer in coc-settings.json, you should remove it to avoid running clangd twice!

Protocol extensions

clangd supports some extensions that are not in the official Language Server Protocol specification.

coc-clangd adds support for:

  • Switching between header and implementation file: :CocCommand clangd.switchSourceHeader
    • You can open in split buffer by :CocCommand clangd.switchSourceHeader vsplit
  • File status monitor, shows on NeoVim statusline
  • Describe symbol under the cursor: :CocCommand clangd.symbolInfo
  • Completions that adjust text near the cursor (e.g. correcting . to ->)

Configurations

:CocConfig opens your global coc-settings.json. :CocLocalConfig opens local configuration for your project ($PROJECTROOT/.vim/coc-settings.json)

ConfigurationsDescriptionDefault
clangd.enabledenable coc-clangdtrue
clangd.argumentsarguments for clangd server[]
clangd.checkUpdatescheck for clangd language server updates on startupfalse
clangd.disableCompletiondisable completion source from clangdfalse
clangd.disableDiagnosticsdisable diagnostics from clangdfalse
clangd.disableSnippetCompletiondisable completion snippet from clangdfalse
clangd.disableProgressNotificationsdisable indexing progress notifications from clangdfalse
clangd.compilationDatabasePathspecifies the directory containing the compilation database''
clangd.compilationDatabaseCandidatesspecifies directories that may contain the compilation database, you can use ${workspaceFolder} variables https://code.visualstudio.com/docs/editor/variables-reference[]
clangd.fallbackFlagsextra clang flags used to parse files when no compilation database is found[]
clangd.pathpath to clangd executableclangd

Note:

Semantic highlighting is disabled by default in coc.nvim, you can enable it with semanticTokens.enable.

Commands

  • clangd.switchSourceHeader: switch between source/header files
  • clangd.symbolInfo: resolve symbol info under the cursor
  • clangd.memoryUsage: show memory usage
  • clangd.ast: show AST
  • clangd.install: install latest clangd release from GitHub
  • clangd.update: check for updates to clangd from GitHub

License

Apache 2.0 with LLVM Exception

This is the standard LLVM license.


This extension is built with create-coc-extension

0.30.2

4 months ago

0.30.1

5 months ago

0.30.0

5 months ago

0.29.3

8 months ago

0.29.2

8 months ago

0.29.1

10 months ago

0.29.0

11 months ago

0.28.0

1 year ago

0.27.0

1 year ago

0.25.1

2 years ago

0.26.2

2 years ago

0.26.1

2 years ago

0.26.0

2 years ago

0.25.0

2 years ago

0.23.0

2 years ago

0.24.0

2 years ago

0.22.0

2 years ago

0.21.4

2 years ago

0.21.3

2 years ago

0.21.2

2 years ago

0.21.1

2 years ago

0.21.0

2 years ago

0.20.1

2 years ago

0.20.0

2 years ago

0.19.0

2 years ago

0.18.1

2 years ago

0.18.2

2 years ago

0.18.0

2 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.15.1

3 years ago

0.14.1

3 years ago

0.14.0

3 years ago

0.13.0

3 years ago

0.12.0

3 years ago

0.11.0

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

4 years ago

0.4.14

4 years ago

0.4.13

4 years ago

0.4.12

4 years ago

0.4.11

4 years ago

0.4.10

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago