-
Notifications
You must be signed in to change notification settings - Fork 0
spectr(archive): add-nvimf-program #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,67 @@ | ||||||
| # Shell Utilities Specification | ||||||
|
|
||||||
| ## Purpose | ||||||
|
|
||||||
| TODO: Add purpose description | ||||||
|
|
||||||
| ## Requirements | ||||||
|
|
||||||
| ### Requirement: Fuzzy File Opening (nvimf) | ||||||
| The system SHALL provide an `nvimf` command that enables interactive fuzzy file selection with syntax-highlighted preview and opens the selected file in Neovim. | ||||||
|
|
||||||
| #### Scenario: Interactive file selection | ||||||
| - **WHEN** user runs `nvimf` without arguments in a directory | ||||||
| - **THEN** the system displays an interactive fuzzy finder listing all files in the current directory and subdirectories | ||||||
| - **AND** shows a syntax-highlighted preview using bat for the selected file | ||||||
| - **AND** opens the selected file in Neovim upon confirmation | ||||||
|
|
||||||
| #### Scenario: No file selected | ||||||
| - **WHEN** user runs `nvimf` and cancels the selection (ESC or Ctrl-C) | ||||||
| - **THEN** the system exits without opening any file | ||||||
| - **AND** returns a zero exit code (graceful cancellation) | ||||||
|
|
||||||
| #### Scenario: Empty directory | ||||||
| - **WHEN** user runs `nvimf` in a directory with no files | ||||||
| - **THEN** the system displays an empty fuzzy finder | ||||||
| - **AND** exits gracefully when canceled | ||||||
|
|
||||||
| #### Scenario: Editor integration | ||||||
| - **WHEN** user selects a file from the fuzzy finder | ||||||
| - **THEN** the system opens the file in Neovim | ||||||
| - **AND** preserves the terminal state and working directory | ||||||
|
|
||||||
| ### Requirement: Cross-Platform File Selection Deployment | ||||||
| The `nvimf` program SHALL be deployed as a packaged Nix derivation with proper dependency management. | ||||||
|
|
||||||
| #### Scenario: NixOS installation | ||||||
| - **WHEN** nvimf module is enabled on a NixOS system | ||||||
| - **THEN** the `nvimf` command is available in system PATH | ||||||
| - **AND** required dependencies (fzf, bat, neovim) are automatically available | ||||||
|
|
||||||
| #### Scenario: Darwin installation | ||||||
| - **WHEN** nvimf module is enabled on a macOS system via nix-darwin | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove redundant "system" after macOS. "macOS" already denotes the operating system, so appending "system" is redundant. Apply this diff: -- **WHEN** nvimf module is enabled on a macOS system via nix-darwin
+- **WHEN** nvimf module is enabled on macOS via nix-darwin📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[style] ~42-~42: This phrase is redundant (‘OS’ stands for ‘operating system’). Use simply “macOS”. (ACRONYM_TAUTOLOGY) 🤖 Prompt for AI Agents |
||||||
| - **THEN** the `nvimf` command is available in system PATH | ||||||
| - **AND** required dependencies are automatically available | ||||||
|
|
||||||
| #### Scenario: Engineer feature integration | ||||||
| - **WHEN** the engineer feature is enabled | ||||||
| - **THEN** nvimf is automatically available alongside other development tools | ||||||
|
|
||||||
| ### Requirement: Preview and Dependency Management | ||||||
| The nvimf program SHALL explicitly declare its runtime dependencies (fzf, bat, neovim) and provide syntax-highlighted file previews. | ||||||
|
|
||||||
| #### Scenario: Syntax highlighting in preview | ||||||
| - **WHEN** user navigates through files in the fuzzy finder | ||||||
| - **THEN** the preview pane shows syntax-highlighted content for recognized file types | ||||||
| - **AND** uses bat's automatic language detection | ||||||
|
|
||||||
| #### Scenario: Missing dependencies handled by Nix | ||||||
| - **WHEN** nvimf module is installed via Nix | ||||||
| - **THEN** all runtime dependencies are available in the wrapped script's PATH | ||||||
| - **AND** the script does not fail due to missing commands | ||||||
|
|
||||||
| #### Scenario: Script wrapper isolation | ||||||
| - **WHEN** nvimf script is executed | ||||||
| - **THEN** it uses the Nix-provided versions of fzf, bat, and neovim | ||||||
| - **AND** does not rely on system-installed versions of these tools | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fill in the Purpose section before archiving.
This PR is marked as archiving a "completed change," but the Purpose section contains a TODO placeholder. Since the change is considered complete, the purpose should be documented to provide context for consumers of this specification.
Suggested addition:
📝 Committable suggestion
🤖 Prompt for AI Agents