Improve extension API documentation (#10322)
This PR adds some more documentation to symbols exported from the `zed_extension_api` crate. Release Notes: - N/A
This commit is contained in:
parent
414058379b
commit
132b8aa5c7
6 changed files with 26 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
//! The Zed Rust Extension API allows you write extensions for [Zed](https://zed.dev/) in Rust.
|
||||
|
||||
/// Provides access to Zed settings.
|
||||
pub mod settings;
|
||||
|
||||
use core::fmt;
|
||||
|
|
|
@ -6,6 +6,7 @@ use serde_json;
|
|||
pub use types::*;
|
||||
|
||||
impl LanguageSettings {
|
||||
/// Returns the [`LanguageSettings`] for the given language.
|
||||
pub fn for_worktree(language: Option<&str>, worktree: &Worktree) -> Result<Self> {
|
||||
let location = SettingsLocation {
|
||||
worktree_id: worktree.id(),
|
||||
|
@ -18,6 +19,7 @@ impl LanguageSettings {
|
|||
}
|
||||
|
||||
impl LspSettings {
|
||||
/// Returns the [`LspSettings`] for the given language server.
|
||||
pub fn for_worktree(language_server_name: &str, worktree: &Worktree) -> Result<Self> {
|
||||
let location = SettingsLocation {
|
||||
worktree_id: worktree.id(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue