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§

AttachRequest
BuildTaskDefinitionTemplatePayload
CodeLabel
A label containing some code.
CodeLabelSpanLiteral
A span containing a code literal.
ContextServerConfiguration
Configuration for context server setup and installation.
ContextServerId
The ID of a context server.
DebugAdapterBinary
The lowest-level representation of a debug session, which specifies:
DebugConfig
Debug Config is the “highest-level” configuration for a debug session. It comes from a new session modal UI; thus, it is essentially debug-adapter-agnostic. It is expected of the extension to translate this generic configuration into something that can be debugged by the adapter (debug scenario).
DebugScenario
Debug Scenario is the user-facing configuration type (used in debug.json). It is still concerned with what to debug and not necessarily how to do it (except for any debug-adapter-specific configuration options).
DebugTaskDefinition
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.
LaunchRequest
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.
StartDebuggingRequestArguments
TaskTemplate
TcpArguments
TcpArgumentsTemplate
Worktree
A Zed worktree.

Enums§

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

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.
resolve_tcp_template
Resolves a specified TcpArgumentsTemplate into TcpArguments
set_language_server_installation_status
Updates the installation status for the given language server.

Type Aliases§

BuildTaskTemplate
A task template for building a debug target.
Command
EnvVars
Range
Result
A result returned from a Zed extension.