Crate zed_extension_api

Source
Expand description

The Zed Rust Extension API allows you write extensions for Zed in Rust.

Re-exports§

pub use serde_json;

Modules§

http_client
An HTTP client.
lsp
Constructs for interacting with language servers over the Language Server Protocol (LSP).
process
A module for working with processes.
settings
Provides access to Zed settings.

Macros§

register_extension
Registers the provided type as a Zed extension.

Structs§

CodeLabel
A label containing some code.
CodeLabelSpanLiteral
A span containing a code literal.
ContextServerId
The ID of a context server.
GithubRelease
A GitHub release.
GithubReleaseAsset
An asset from a GitHub release.
GithubReleaseOptions
The options used to filter down GitHub releases.
KeyValueStore
A key-value store.
LanguageServerId
The ID of a language server.
Project
A Zed project.
SlashCommand
A slash command for use in the Assistant.
SlashCommandArgumentCompletion
A completion for a slash command argument.
SlashCommandOutput
The output of a slash command.
SlashCommandOutputSection
A section in the slash command output.
Worktree
A Zed worktree.

Enums§

Architecture
A platform architecture.
CodeLabelSpan
A span within a code label.
DownloadedFileType
The type of a downloaded file.
LanguageServerInstallationStatus
The installation status for a language server.
Os
An operating system.

Traits§

Extension
A Zed extension.

Functions§

current_platform
Gets the current operating system and architecture.
download_file
Downloads a file from the given URL and saves it to the given path within the extension’s working directory.
github_release_by_tag_name
Returns the GitHub release with the specified tag name for the given GitHub repository.
latest_github_release
Returns the latest release for the given GitHub repository.
make_file_executable
Makes the file at the given path executable.
node_binary_path
Returns the path to the Node binary used by Zed.
npm_install_package
Installs the specified NPM package.
npm_package_installed_version
Returns the installed version of the given NPM package, if it exists.
npm_package_latest_version
Returns the latest version of the given NPM package.
set_language_server_installation_status
Updates the installation status for the given language server.

Type Aliases§

Command
EnvVars
Range
Result
A result returned from a Zed extension.