You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some rare cases, a flash overlay is on the same cell as an existing indent guide. The highlight is updated, but the virtual text is not, i.e. the text is still the indent guide character but the highlight is from flash.nvim.
This happens because both plugins are setting virtual text in an extmark in the same cell, but they are in different namespaces. The flash.nvim extmark has a higher priority so it overwrites the highlight, but being in different namespaces means the virtual text cannot be overwritten. You can't clear the "snacks_indent" namespace as it is re-created on the next redraw event, and snacks.indent automatically calls redraw.
The only workaround is to:
Use flash.nvim as normal, with snacks.indent enabled
If they overlap, press ESC then use :lua Snacks.indent.disable()
Use flash.nvim again
Re-enable snacks.indent with :lua Snacks.indent.enable()
A keymap was added in 37f9ddc to make toggling snacks.indent easier.
I can't see an easy way of fixing this. I assume it would need some hacky changes made to both plugins.
For that reason I will not attempt to actually fix this. This issue is just for documentation.
Example:
Start with this YAML file, ensuring the YAML tree-sitter parser is installed:
---
name: CIon:
push:
pull_request:
# this is only for testingworkflow_dispatch:
jobs:
stylua:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4with:
token: ${{ secrets.GITHUB_TOKEN }}version: latestargs: --check .
Important
This issue is just for documentation.
In some rare cases, a flash overlay is on the same cell as an existing indent guide. The
highlightis updated, but the virtual text is not, i.e. the text is still the indent guide character but the highlight is fromflash.nvim.This happens because both plugins are setting virtual text in an extmark in the same cell, but they are in different namespaces. The
flash.nvimextmark has a higher priority so it overwrites the highlight, but being in different namespaces means the virtual text cannot be overwritten. You can't clear the"snacks_indent"namespace as it is re-created on the next redraw event, andsnacks.indentautomatically callsredraw.The only workaround is to:
flash.nvimas normal, withsnacks.indentenabledESCthen use:lua Snacks.indent.disable()flash.nvimagainsnacks.indentwith:lua Snacks.indent.enable()A keymap was added in 37f9ddc to make toggling
snacks.indenteasier.I can't see an easy way of fixing this. I assume it would need some hacky changes made to both plugins.
For that reason I will not attempt to actually fix this. This issue is just for documentation.
Example:
Start with this YAML file, ensuring the YAML tree-sitter parser is installed:
Place the cursor on the
tat the start oftoken.Use
flash.nvim:Disable
snacks.indent.Use
flash.nvimagain:Enable
snacks.indent.