Skip to content

Commit

Permalink
zed extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Feel-ix-343 committed Mar 24, 2024
1 parent 18e2694 commit 50dd532
Show file tree
Hide file tree
Showing 6 changed files with 381 additions and 0 deletions.
1 change: 1 addition & 0 deletions markdown-oxide-zed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
320 changes: 320 additions & 0 deletions markdown-oxide-zed/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions markdown-oxide-zed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "markdown-oxide-zed"
version = "0.1.0"
edition = "2021"

[dependencies]
zed_extension_api = "0.0.4"

[lib]
crate-type = ["cdylib"]
12 changes: 12 additions & 0 deletions markdown-oxide-zed/extension.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
id = "markdown-oxide"
name = "Markdown Oxide"
description = "Obsidian-Inspired PKM Language Server for Zed"
version = "0.0.1"
schema_version = 1
authors = ["Felix Zeller <[email protected]>"]
repository = "https://github.com/Feel-ix-343/markdown-oxide"


[language_servers.markdown-oxide]
name = "Markdown-Oxide LSP"
language = "Markdown"
Binary file added markdown-oxide-zed/extension.wasm
Binary file not shown.
38 changes: 38 additions & 0 deletions markdown-oxide-zed/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
use zed::Command;
use zed_extension_api as zed;

struct Moxide {

}


impl zed::Extension for Moxide {
fn language_server_command(
&mut self,
config: zed::LanguageServerConfig,
worktree: &zed::Worktree,
) -> zed::Result<zed::Command> {


zed::set_language_server_installation_status(
&config.name,
&zed::LanguageServerInstallationStatus::Downloading,
);

Ok(Command {
command: "markdown-oxide".to_string(),
args: Default::default(),
env: Default::default()
})

}

fn new() -> Self
where
Self: Sized {

Moxide{}
}
}

zed::register_extension!(Moxide);

0 comments on commit 50dd532

Please sign in to comment.