Skip to content

Commit

Permalink
i18n(zh-cn): Add content-intellisense.mdx (#10714)
Browse files Browse the repository at this point in the history
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
  • Loading branch information
Nin3lee and liruifengv authored Jan 17, 2025
1 parent e9ba60d commit 81626d4
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: 用于内容集合的实验性 IntelliSense
sidebar:
label: 用于集合的 Intellisense
i18nReady: true
---

import Since from '~/components/Since.astro'

<p>

**类型:** `boolean`<br />
**默认值:** `false`<br />
<Since v="4.14.0" />
</p>

在能兼容的编辑器中为你的内容集合条目启用 IntelliSense 功能(例如:代码补全,快速提示)。

启用后,此功能将生成 JSON 结构并将其添加到项目中的 `.astro` 目录中。这些文件能被 Astro 语言服务器调用以在内容文件(`.md``.mdx``.mdoc`)中提供 Intellisense。

```js
{
experimental: {
contentIntellisense: true,
},
}
```

要将此功能与 Astro VS Code 扩展一起使用,你还必须在 VS Code 设置中启用 `astro.content-intellisense` 选项。而对于直接使用 Astro 语言服务器的编辑器,请传递 `contentIntellisense: true` 初始化参数来启用此功能。

0 comments on commit 81626d4

Please sign in to comment.