Back to Fresh

Plugins

crates/fresh-editor/plugins/README.md

0.3.22.5 KB
Original Source

Plugins

This directory contains production-ready plugins for the editor. Plugins are written in TypeScript and run in a sandboxed QuickJS environment (transpiled via oxc_transformer). They are automatically loaded when the editor starts.

Available Plugins

Core Plugins

PluginDescription
welcome.tsDisplays welcome message on startup
manual_help.tsManual page and keyboard shortcuts display
diagnostics_panel.tsLSP diagnostics panel with navigation
search_replace.tsSearch and replace functionality
path_complete.tsPath completion in prompts

Git Integration

PluginDescription
git_grep.tsInteractive search through git-tracked files
git_find_file.tsFuzzy file finder for git repositories
git_blame.tsGit blame view with commit navigation
git_log.tsGit log viewer with history browsing

Code Enhancement

PluginDescription
todo_highlighter.tsHighlights TODO/FIXME/HACK keywords in comments
color_highlighter.tsHighlights color codes with their actual colors
find_references.tsFind references across the codebase
clangd_support.tsClangd-specific LSP features (switch header/source)

Editing Modes

PluginDescription
markdown_compose.tsSemi-WYSIWYG markdown editing with soft breaks
merge_conflict.ts3-way merge conflict resolution

Development/Testing

PluginDescription
test_view_marker.tsTesting utilities for view markers

Example Plugins

The examples/ directory contains educational examples demonstrating specific API features:

ExampleDescription
hello_world.tsMinimal plugin demonstrating command registration
async_demo.tsAsync process spawning
buffer_query_demo.tsBuffer state querying
virtual_buffer_demo.tsCreating virtual buffers with text properties
bookmarks.tsBookmark management example
git_grep.tsGit grep implementation example

Plugin Development

For plugin development guides, see: