Skip to content

The option opts.callbacks should be further splitted into two cases: zoom-in & zoom-out #93

@nyngwang

Description

@nyngwang

Problem

For use case: I would like to open code minimap only when a file is open in the NeoZoom floating window. This requires two callbacks for both zoom-in and zoom-out when they are completed.

Current Status

The current option opts.callbacks is exclusively for zoom-in, so the minimap won't get closed on zoom-out.

Related

#88 was proposed so that a user can detect the zoom-out event by the User event NeoZoomClosed. Trade-offs I can think of:

  • Providing User events: This eliminates the need to require('neo-zoom') explicitly for detecting zoom-in/zoom-out. But personally I don't prefer increasing the number of User events.
  • Allowing users to modify opts.callbacks on the fly: This avoids the need to use nvim_create_autocmd. But people might not like hard-coding require('neo-zoom') outside of the config context.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions