{"id":1509,"date":"2023-12-06T08:57:32","date_gmt":"2023-12-06T00:57:32","guid":{"rendered":"https:\/\/lyvba.com\/?p=1509"},"modified":"2023-12-06T08:57:32","modified_gmt":"2023-12-06T00:57:32","slug":"vscode_clangd","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2023\/12\/06\/vscode_clangd\/","title":{"rendered":"VSCode \u5b66\u4e60C\/C++\u4ee3\u7801\u63d2\u4ef6 clangd \u7b80\u6613\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2023\/12\/clangd.png\" alt=\"\" \/><\/p>\n<h2>VSCode \u5b66\u4e60C\/C++\u4ee3\u7801\u63d2\u4ef6 clangd \u7b80\u6613\u4f7f\u7528\u6559\u7a0b<\/h2>\n<ul>\n<li>clangd \u901a\u8fc7\u63d0\u4f9b\u4ee5\u4e0b\u529f\u80fd\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u7f16\u5199\u3001\u7406\u89e3\u548c\u6539\u8fdb C\/C++ \u4ee3\u7801\uff1a<\/li>\n<li>\u7801\u5b8c\u6210<\/li>\n<li>\u7f16\u8bd1\u9519\u8bef\u548c\u8b66\u544a<\/li>\n<li>\u8f6c\u5230\u5b9a\u4e49\u548c\u4ea4\u53c9\u5f15\u7528<\/li>\n<li>\u60ac\u505c\u4fe1\u606f\u548c\u9576\u5d4c\u63d0\u793a<\/li>\n<li>\u5305\u62ec\u7ba1\u7406<\/li>\n<li>\u4ee3\u7801\u683c\u5f0f\u5316<\/li>\n<li>\u7b80\u5355\u7684\u91cd\u6784<\/li>\n<\/ul>\n<h2>1. \u9996\u5148\u5728 <code>VSCode<\/code> \u5b89\u88c5 <code>clangd<\/code> \u63d2\u4ef6<\/h2>\n<ul>\n<li>\u6253\u5f00\u6269\u5c55\u9762\u677f\uff0c\u641c\u7d22 <code>clangd<\/code>\uff0c\u5b89\u88c5\u63d2\u4ef6\u6210\u529f\u63d2\u4ef6\u3002<\/li>\n<li>\u5b89\u88c5\u597d clangd \u63d2\u4ef6\uff0c\u8fd8\u4e0d\u4f1a\u8d77\u4f5c\u7528\uff0c\u9700\u8981\u4e0b\u8f7d\u8bed\u8a00\u670d\u52a1<br \/>\n<h3>\u6309 ctrl + shift + p<\/h3>\n<h3>\u8f93\u5165  clangd: Dowland language server<\/h3>\n<\/li>\n<\/ul>\n<h2>2. \u56fd\u5185\u4e00\u822c\u4e0d\u592a\u597d\u4e0b\u8f7d\uff0c\u6240\u4ee5\u8981\u624b\u52a8\u5b89\u88c5  <code>clangd language server<\/code><\/h2>\n<h3>\u8bbf\u95ee <a href=\"https:\/\/github.com\/clangd\/clangd\">https:\/\/github.com\/clangd\/clangd<\/a> \u5f00\u6e90\u9879\u76ee<\/h3>\n<h3>\u627e\u5230 <code>Releases<\/code> <code>Latest<\/code> <a href=\"https:\/\/github.com\/clangd\/clangd\/releases\/tag\/17.0.3\">\u4e0b\u8f7d\u94fe\u63a5<\/a><\/h3>\n<h3>\u4e0b\u8f7d\u6587\u4ef6 <a href=\"https:\/\/github.com\/clangd\/clangd\/releases\/download\/17.0.3\/clangd-windows-17.0.3.zip\">https:\/\/github.com\/clangd\/clangd\/releases\/download\/17.0.3\/clangd-windows-17.0.3.zip<\/a><\/h3>\n<h2>3. \u89e3\u538b <code>clangd-windows-17.0.3.zip<\/code> \u5230\u4f60\u9009\u7684\u4f4d\u7f6e\uff0c\u627e\u5230 <code>clangd.exe<\/code> \u6240\u5728\u76ee\u5f55\uff0c\u6dfb\u52a0\u5230 <code>PATH<\/code> \u73af\u5883\u53d8\u91cf<\/h2>\n<h3>\u4f8b\u5982\u6211\u9009\u7684\u76ee\u5f55\u662f <code>C:\\app\\clangd\\bin<\/code><\/h3>\n<h2>4. \u4e00\u822c\u91cd\u65b0\u5f00\u542f VSCode \uff0c\u6253\u5f00\u4e00\u4e2a C\/C++ \u6e90\u7801\u6587\u4ef6\uff0c\u5c31\u80fd\u81ea\u52a8\u542f\u52a8 <code>clangd<\/code> \u63d2\u4ef6\u4e86<\/h2>\n<hr \/>\n<h2>\u600e\u4e48\u5173\u95ed clangd \u63d2\u4ef6 for vscode \u4ee3\u7801\u4e2d\u663e\u793a\u7684 Format: \u767d\u5b57\u7b26<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2023\/12\/clangd_Togggle.png\" alt=\"\" \/><\/p>\n<h3>\u5173\u95ed\u65b9\u6cd5: \u6309 ctrl + shift + p<\/h3>\n<h3>\u8f93\u5165 clangd: Toggle inlay hints<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>VSCode \u5b66\u4e60C\/C++\u4ee3\u7801\u63d2\u4ef6 clangd \u7b80\u6613\u4f7f\u7528\u6559\u7a0b clangd \u901a\u8fc7\u63d0\u4f9b\u4ee5\u4e0b\u529f\u80fd\u5e2e\u52a9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1510,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[31,50],"class_list":["post-1509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn","tag-cpp","tag-vscode"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=1509"}],"version-history":[{"count":1,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1509\/revisions"}],"predecessor-version":[{"id":1512,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1509\/revisions\/1512"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media\/1510"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=1509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=1509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=1509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}