{"id":13872563,"url":"https://github.com/clangd/vscode-clangd","last_synced_at":"2025-04-13T13:24:59.780Z","repository":{"id":37400067,"uuid":"257710112","full_name":"clangd/vscode-clangd","owner":"clangd","description":"Visual Studio Code extension for clangd","archived":false,"fork":false,"pushed_at":"2025-03-27T05:21:41.000Z","size":869,"stargazers_count":672,"open_issues_count":235,"forks_count":124,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-06T10:08:14.844Z","etag":null,"topics":["clangd","vscode"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clangd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-21T20:38:12.000Z","updated_at":"2025-04-05T13:47:50.000Z","dependencies_parsed_at":"2023-11-29T06:31:38.213Z","dependency_job_id":"ee040c04-d5b5-4763-a066-1c3092b20fc0","html_url":"https://github.com/clangd/vscode-clangd","commit_stats":{"total_commits":304,"total_committers":50,"mean_commits":6.08,"dds":0.7138157894736843,"last_synced_commit":"da913bee658e109b9d4cb2f6f7a7a924e163aff0"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clangd%2Fvscode-clangd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clangd%2Fvscode-clangd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clangd%2Fvscode-clangd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clangd%2Fvscode-clangd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clangd","download_url":"https://codeload.github.com/clangd/vscode-clangd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248719142,"owners_count":21150704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clangd","vscode"],"created_at":"2024-08-05T23:00:46.036Z","updated_at":"2025-04-13T13:24:59.751Z","avatar_url":"https://github.com/clangd.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# clangd\n\n[clangd](https://clangd.llvm.org) helps developers write, understand and\nimprove C/C++ code by providing:\n\n - code completion\n - compile errors and warnings\n - go-to-definition and cross references\n - hover information and inlay hints\n - include management\n - code formatting\n - simple refactorings\n\nFull documentation for clangd is at [clangd.llvm.org](https://clangd.llvm.org).\n\n## Setup\n\n### `clangd` server\n\nThe extension requires the `clangd` language server.\nYou will be prompted to download it if it's not found on your PATH.\n(Automatic installation is possible on x86-64 Linux, Windows, and Mac).\n\nIf you have an old version of clangd installed on your system already, you can\nrun \"Check for clangd language server update\" from the command palette.\n\n### Project setup\n\nclangd is based on the clang C++ compiler, and understands even complex C++\ncode.  However, you must tell clangd how your project is built (compile flags).\n[A `compile_commands.json` file](http://clang.llvm.org/docs/JSONCompilationDatabase.html)\ncan usually be generated by your build system\n(e.g. with CMake, by setting `-DCMAKE_EXPORT_COMPILE_COMMANDS=1`).\n\nSee [Project Setup](https://clangd.llvm.org/installation#project-setup)\nin the clangd documentation for details and alternatives.\n\nThe clangd server also supports a number of feature customizations using its\n[config file](https://clangd.llvm.org/config.html).\n\n## Features\n\n### Code completion\n\nSuggestions will appear as you type names, or after `.` or `-\u003e`.\nBecause clangd uses a full C++ parser, code completion has access to precise\ntype information.\n\n![Code completion](doc-assets/complete.png)\n\n### Errors, warnings, and clang-tidy\n\nCode errors are shown as you type (both as red squiggle underlines, and in the\n\"Problems\" panel). These are the same as produced by the clang compiler, and\nsuggested fixes can automatically be applied.\n\n![Error with fix](doc-assets/diagnostics.png)\n\nMost clang-tidy checks are supported (these can be enabled using a [.clang-tidy\nfile](https://clang.llvm.org/extra/clang-tidy/)).\n\n### Cross-references\n\nGo-to-definition and find-references work across your code, using a project-wide\nindex.\n\n![Cross-reference list](doc-assets/xrefs.png)\n\nPress `Ctrl-P #` to quickly navigate to a symbol by name.\n\n### Hover and inlay hints\n\nClangd can describe almost any entity if you hover the mouse (or press Ctrl-KI).\n\n![Hover and inlay hints](doc-assets/hover.png)\n\nInlay hints for parameters and deduced types can be shown temporarily or\npermanently (the `editor.inlayHints.enabled` setting controls this).\n\n### Include management\n\nCode completion works across your codebase and adds `#include` directives where\nneeded. The `•` shows includes that will be inserted.\n\nclangd can suggest inserting missing #includes, where they cause errors.\nIt can [warn on unused includes](https://clangd.llvm.org/guides/include-cleaner).\n\n![Fix inserts include](doc-assets/include.png)\n\n### Formatting\n\nclangd uses the `clang-format` engine. You can format a file or the selection.\nWhen \"Format on Type\" is enabled in the settings, pressing enter will cause\nclangd to format the old line and semantically reindent.\n\n![Format-on-type](doc-assets/format.png)\n\nThe style used for formatting (and certain other operations) is controlled by the project's\n[.clang-format file](https://clang.llvm.org/docs/ClangFormatStyleOptions.html).\n\nNote that if you prefer to use something other than clangd for formatting, you can\nchoose a different formatter with the `\"editor.defaultFormatter\"` setting.\n\n### Refactoring\n\nclangd supports some local refactorings. When you select an expression or\ndeclaration, the lightbulb menu appears and you can choose a code action.\n\n![Extract variable code action](doc-assets/extract.png)\n\nCurrent refactorings include:\n - extract variable/function\n - expand `auto` types and macros\n - use raw strings\n - rename (bound to `\u003cF2\u003e`, rather than a contextual code action)\n\n## Bugs/contributing\n\nclangd is part of the [LLVM project](https://llvm.org).\n\nIf you'd like to help out, reach out to clangd-dev@lists.llvm.org.\n\nIf you've found a bug in this extension, please file it at https://github.com/clangd/vscode-clangd/issues.\nIf you've found a bug in clangd, please file at https://github.com/clangd/clangd/issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclangd%2Fvscode-clangd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclangd%2Fvscode-clangd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclangd%2Fvscode-clangd/lists"}