Open
Conversation
* Prevent inline image previews from displaying when Neovim is in Insert or Select mode. * Hide the image preview when the cursor is positioned within the source text range of the concealed expression. * Refresh the concealment state immediately after image placements are updated to ensure visibility rules are applied instantly.
* Simplify cursor range checks for concealed inline images * Hide image previews if the cursor is on any line covered by the range * Explicitly include 'math' type images in the concealment hiding logic
* Introduce `M.match_at_cursor` to return the full image match object, decoupling it from the old `M.at_cursor` function. * Update `M.at_cursor` to use the new matching function, maintaining backward compatibility while simplifying the original implementation. * Prevent image hover popups from appearing in non-normal modes, ensuring the hover window only shows up during navigation. * Ensure float windows are created when `Snacks.image.config.doc.float` is true, regardless of the `inline` setting, allowing simultaneous use of inline placeholders and hover previews.
- Calculate the buffer position corresponding to the end of the image range. - Position the hover window relative to the range end when the image has defined delimiters. - Ensure the image preview does not overlap the closing delimiters of the source expression.
- Update image documentation hover when the cursor moves in insert mode by listening to `CursorMovedI`. - Allow documentation hover windows to remain visible in insert and select modes. - Refine inline image concealment logic to only hide images in insert or select mode if they are explicitly marked for concealment.
- Conceal the image placement when the cursor enters the text range it represents. - Apply cursor-based hiding logic in Normal mode to allow editing of concealed source text. - Prevent hiding images that belong to inactive or non-current buffers during updates.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Related Issue(s)
Screenshots