问题描述:
https://github.com/clangd/vscode-clangd/issues/298
报错信息:
Error: command 'clangd.inlayHints.toggle' already exists at u.registerCommand (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:93:28683) at Object.registerCommand (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:107:30423) at n9.initialize (/home/nr/.vscode/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.15/out/bundle.js:239:7973) at Mb.initializeFeatures (/home/nr/.vscode/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.15/out/bundle.js:36:13023) at /home/nr/.vscode/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.15/out/bundle.js:36:5978
解决方法:
升级clangd
的VSCode
插件,该问题在以下提交已修复:
Avoid registering the 'clangd.inlayHints.toggle' command multiple times #302
如果不想升级,则可以按照以上Commit手动修改本地src/inlay-hints.ts
文件。建议修改前备份原文件。