Skip to main content

EXAMPLE_PLUGIN

Constant EXAMPLE_PLUGIN 

Source
pub const EXAMPLE_PLUGIN: &str = r#"# Example Enya Plugin
# Place this file in ~/.enya/plugins/

[plugin]
name = "example"
version = "0.1.0"
description = "An example plugin showing available features"
author = "Your Name"
enabled = true

# Commands are accessible via the command palette (:command-name)
[[commands]]
name = "hello"
description = "Display a greeting message"
notify = "Hello from the example plugin!"

[[commands]]
name = "open-docs"
aliases = ["docs"]
description = "Open Enya documentation"
url = "https://enya.build/docs"

[[commands]]
name = "run-tests"
description = "Run tests in current directory"
# Shell commands run asynchronously
shell = "cargo test"
accepts_args = true

# Keybindings for quick access
# Format: "Modifier+Key" (Space for leader key)
[[keybindings]]
keys = "Space+x+h"
command = "hello"
description = "Say hello"

[[keybindings]]
keys = "Space+x+d"
command = "open-docs"
description = "Open docs"
"#;
Expand description

Example plugin template.