Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImportOptions ¶
type ImportOptions struct {
// Required, editor type
EditorType pluginapi.EditorType
// Required, input stream, contains the keymap config for different editors
InputStream io.Reader
// Optional, existing onekeymap base setting
Base *keymapv1.Keymap
}
ImportOptions provides configuration for an import operation.
type ImportResult ¶
type ImportResult struct {
// The converted keymap setting.
Setting *keymapv1.Keymap
// Any issues that arose during the import process.
Report *keymapv1.ValidationReport
// The changes to the keymap setting.
Changes *KeymapChanges
}
ImportResult represents the result of an import operation.
type Importer ¶
type Importer interface {
// Import converts keymaps from a source stream. It returns the converted
// settings and a report detailing any conflicts or unmapped actions.
Import(ctx context.Context, opts ImportOptions) (*ImportResult, error)
}
Importer defines the interface for the import service, which handles the conversion of editor-specific keymaps into the universal format.
type KeymapChanges ¶
type KeymapChanges struct {
// The keymaps that are added.
Add []*keymapv1.Action
// The keymaps that are removed.
Remove []*keymapv1.Action
// The keymaps that are updated.
Update []KeymapDiff
}
KeymapChanges represents the changes to a keymap setting.
Click to show internal directories.
Click to hide internal directories.