C++在VSCODE扩展中键入互补

发布于 2025-02-03 00:38:35 字数 431 浏览 0 评论 0原文

我正在使用模板项目在docker上学习C ++ -practices/gui_starter_template 在C ++中。

我有以下代码,其中名称:文本:最初不是编写的 代码,但已完成,以便我可以看到它是哪种类型。
这不是问题,因为执行时会消失。
这是哪个扩展?
它很有用,但是我想知道它是哪个扩展。
我使用C ++更好的语法,clang整洁和叮当态格式。

struct IMG : Tag
{
  explicit IMG(std::string url) : Tag{ name : "img", text : "" } { attributes.emplace_back(make_pair("src", std::move(url))); }
};
}// namespace html

I am learning C++ on docker using the template project at https://github.com/cpp-best-practices/gui_starter_template in C++.

I have the following code, where name: and text:are not originally written
code, but it is completed so that I can see which type it is.
It is not a problem because it disappears when it is executed.
Which extension is this?
It is useful, but I would like to know which extension it is.
I use C++ better syntax, Clang tidy and Clang Format.

struct IMG : Tag
{
  explicit IMG(std::string url) : Tag{ name : "img", text : "" } { attributes.emplace_back(make_pair("src", std::move(url))); }
};
}// namespace html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光沙漏 2025-02-10 00:38:35

我认为inlay提示现在是内置功能。 VS代码引入了一些新值,以控制inlay hints的行为,因为 v 1.67

编辑器› inlay hints:启用值:

  • on - inlay inlay提示。
  • OFF - inlay提示被禁用。
  • OnunLelessPressed - 用Ctrl+Alt显示并隐藏了镶嵌提示。
  • offunlesspressed - 隐藏并用Ctrl+Alt显示的inlay提示。

检查此github 问题有关inlay hints

何时 我将inlay提示设置为offunlesspressed,在我按ctrl + alt + alt (请忽略这是一个生锈项目)时,看起来像这样):

I think the inlay hints is a built-in feature now. And VS Code introduced some new values to control how inlay hints behaves since v 1.67 :

Editor › Inlay Hints: Enabled value:

  • on - Inlay hints are enabled.
  • off - Inlay hints are disabled.
  • onUnlessPressed - Inlay hints shown and hidden with Ctrl+Alt.
  • offUnlessPressed - Inlay hints hidden and shown with Ctrl+Alt.

Check this GitHub issue for more detail about inlay hints

When I set inlay hints to offUnlessPressed, it looks like this while I press Ctrl + Alt(Please ignore that it's a Rust project):

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文