Add docs_preprocessor
crate to support Zed Docs (#16700)
This PR adds a mdbook preprocessor for supporting Zed's docs. This initial version adds the following custom commands: **Keybinding** `{#kb prefix::action_name}` (e.g. `{#kb zed::OpenSettings}`) Outputs a keybinding template like `<kbd class="keybinding">{macos_keybinding}|{linux_keybinding}</kbd>`. This template is processed on the client side through `mdbook` to show the correct keybinding for the user's platform. **Action** `{#action prefix::action_name}` (e.g. `{#action zed::OpenSettings}`) For now, simply outputs the action name in a readable manner. (e.g. zed::OpenSettings -> zed: open settings) In the future we'll add additional modes for this template, like create a standard way to render `{action} ({keybinding})`. ## Example Usage ``` To open the assistant panel, toggle the right dock by using the {#action workspace::ToggleRightDock} action in the command palette or by using the {#kb workspace::ToggleRightDock} shortcut. ``` Release Notes: - N/A
This commit is contained in:
parent
5ee4c036f9
commit
46bb04a019
16 changed files with 639 additions and 24 deletions
|
@ -42,7 +42,7 @@ If this script is insufficient for your use case or you run into problems runnin
|
|||
|
||||
The Command Palette is the main way to access functionality in Zed, and its keybinding is the first one you should make yourself familiar with.
|
||||
|
||||
To open the Command Palette, use <kbd>cmd-shift-p|ctrl-shift-p</kbd>.
|
||||
To open the Command Palette, use {#kb command_palette::Toggle}.
|
||||
|
||||
The Command Palette allows you to access pretty much any functionality that's available in Zed.
|
||||
|
||||
|
@ -54,11 +54,11 @@ Any time you see instructions that include commands of the form `zed: ...` or `e
|
|||
|
||||
## Configure Zed
|
||||
|
||||
Use <kbd>cmd-,|ctrl-,</kbd> to open your custom settings to set things like fonts, formatting settings, per-language settings, and more.
|
||||
Use {#kb zed::OpenSettings} to open your custom settings to set things like fonts, formatting settings, per-language settings, and more.
|
||||
|
||||
On macOS, you can access the default configuration using the `Zed > Settings > Open Default Settings` menu item. See [Configuring Zed](./configuring-zed.md) for all available settings.
|
||||
|
||||
On Linux, you can access the default configuration via the Command Palette. Open it with <kbd>ctrl-shift-p</kbd> and type in `zed: open default settings` and then hit return.
|
||||
On Linux, you can access the default configuration via the Command Palette. Open it with {#kb zed::OpenDefaultSettings} and type in `zed: open default settings` and then hit return.
|
||||
|
||||
## Set up your key bindings
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue