-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i18n(zh-cn): Add
content-intellisense.mdx
(#10714)
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
- Loading branch information
1 parent
e9ba60d
commit 81626d4
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/content/docs/zh-cn/reference/experimental-flags/content-intellisense.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` 初始化参数来启用此功能。 |