Skip to content

Add Zed Action/Command to open user, workspace and file dictionary file to allow quick editing #25

@Greenheart

Description

@Greenheart

Proposal

Here's how I imagine the feature could work:

  1. In the Zed editor, press CTRL + SHIFT + P to open the Zed command fuzzy search
  2. harper and the following actions (commands?) provided by this extension show up:
  • harper: open user dictionary
  • harper: open workspace dictionary
  • harper: open file dictionary
  1. Select any of the actions to open that file in an editor, allowing changes to be made and saved explicitly by the user like with normal editor panes. I'm not sure if Zed allows editing files outside of the workspace, but it could probably be solved like the Zed settings.json editor implemented this.

Edge case: the selected dictionary file does not exist

If any of the dictionary files does not yet exist, we could either...

  1. Open a new empty editor for that file, which needs to be explicitly saved by the user to create the file and write to disk. We could likely take advantage of Zed editor features available to extensions here.
  2. Warn or prompt the user.

Of these alternatives, I think the first one (opening an editor for that file) is the best option.

Motivation

Why would this be worthwhile? This feature would make it super easy to view and edit your various dictionary files, especially if you quickly want to add multiple words, or remove something that you added by mistake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions