Commit graph

5 commits

Author SHA1 Message Date
Copilot
fee9b27e00
docs: add Neovim specification and canonical implementation documentation (#2082)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
This PR adds comprehensive documentation for the Neovim Tinymist plugin,
establishing it as the canonical implementation of a Tinymist editor
language client.

## Changes Made

### Added `editors/neovim/Specification.md`
The specification was a mess, so I the reviewer deleted it.

### Enhanced `editors/neovim/CONTRIBUTING.md`
Expanded the contributing guide to document:
- **Canonical Implementation Status**: Establishes this as the
heavily-documented reference implementation for other editors
- **Bootstrap Script Commands**: 
  - `./bootstrap.sh editor` - Interactive editing experience in Docker
  - `./bootstrap.sh test` - Headless test execution
  - `./bootstrap.sh bash` - Development shell access
- **Test Suite Structure**: Overview of all spec files and their testing
purposes
- **Contribution Patterns**: Guidelines for maintaining the reference
implementation

### Updated `.github/copilot-instructions.md`
Added guidance for working with editor integrations:
- **Repository Structure**: Notes the Neovim plugin as canonical
implementation with documentation links
- **Editor Integration Guidelines**: New section specifically for
referencing Neovim patterns
- **Development Workflow**: References to bootstrap commands and
documentation

## Why This Matters

The Neovim plugin now serves as the **canonical implementation** that
other editor integrations can reference for:
- LSP client setup patterns and configuration handling
- Event subscription mechanisms for development events
- Project resolution modes (singleFile vs lockDatabase)
- Export functionality patterns (onSave, onType, never)
- Comprehensive test coverage examples

This documentation enables maintainers and contributors to understand
the complete scope of the Neovim integration and provides a reference
for implementing similar functionality in other editors.

Fixes #2081.

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/Myriad-Dreamin/tinymist/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-08-25 11:48:23 +08:00
Copilot
3699450369
feat: Add comprehensive Claude/Copilot localization instructions (#2076)
Adds comprehensive instructions for AI assistants (Claude/Copilot) to
work with the tinymist localization (l10n) system. The new
`.github/copilot-instructions-l10n.md` file provides detailed guidance
on both phases of the localization process:

## Marking and Extracting Messages

**Rust Backend (`crates/`):**
```rust
// Simple localized message
let message = tinymist_l10n::t!("error.file-not-found", "File not found");

// With parameters
let message = tinymist_l10n::t!(
    "error.invalid-config", 
    "Invalid configuration: {key}", 
    key = config_key
);
```

**TypeScript VSCode Extension (`editors/vscode/`):**
```typescript
import { l10nMsg } from "../l10n";

// Simple message
const message = l10nMsg("Export as PDF");

// With parameters  
const message = l10nMsg("Processing {count} files", { count: fileCount });
```

After adding localized messages, run `yarn build:l10n` to extract them
to TOML files.

## Translating Messages

The system uses TOML format designed for easy LLM modification:

```toml
[export.pdf.success]
en = "PDF exported successfully"
zh = "PDF 导出成功"
fr = "PDF exporté avec succès"
```

## Key Features

- **Complete workflow examples** for both Rust and TypeScript
- **Hierarchical key naming conventions** (e.g.,
`component.category.action`)
- **Translation guidelines** with parameter preservation
- **Best practices** for when to localize vs. when not to
- **Troubleshooting section** for common issues
- **File structure reference** showing the relationship between source
files and locale files

The instructions enable AI assistants to properly add new localizable
strings, update existing translations, and maintain the multilingual
support across the entire tinymist ecosystem.

Fixes #2075.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
2025-08-25 06:36:54 +08:00
Myriad-Dreamin
b78b5fa48c
docs: add guide to develop editor tools (#2050) 2025-08-20 11:53:38 +08:00
Myriad-Dreamin
4c676c1a8d
fix: update copilot instructions for offline testing (#1896)
* fix: update copilot instructions for offline testing

* efat: add PR title convention

* feat: add PR title convention

* feat: add PR title convention
2025-07-09 21:34:11 +08:00
Myriad-Dreamin
1258c0f2ca
feat: add copilot instructions (#1890) 2025-07-09 19:04:59 +08:00