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
# Details
This feature allows the plugin to hide any virtual text that
would be displayed on the line the cursor is currently on.
This enables are super fluid editing experience since nothing
is concealed or obstructed by the rendering behavior.
This is similar conceptually to concealing a link, but rather
than hiding information that is already there, we are hiding
information added by this plugin.
Since this is not a native neovim feature, i.e. I cannot set a
nice value in nvim_buf_set_extmark that makes this happen, this
feature relies on listening to the 'CursorMoved' event. This
event gets triggered on, as you would think, every cursor movement,
so this comes at a very real performance penalty.
The logic has been optimized to avoid re-parsing the entire file on
cursor movements, instead using a cached list of marks and adding the
ones outside the current line. This is noticibely faster and I have
yet to see a significant degredation. Even so the option to disable
this feature is added under the new 'anti_conceal.enabled' option.
Other ways to disable this feature (say on large files) can be added,
please submit any feature requests as an issue.
This should resolve: #15
Though it is doing the exact thing I wanted to avoid, it is easy
enough to opt out of and with the caching I have not noticed much
of a performance penalty.
Not all marks are removed, for instance sign column markers are left
as are virtual lines, since they do not interfere with the underlying
buffer text. Similarly padded code blocks (if used) are not unpadded
since that experience was not great.
Since this plugin now effectively controls the life cycle of marks
there is a breaking change for anyone using the 'custom_handlers' hook.
Rather than directly setting extmarks in the hook the information
needs to be passed back to this plugin so it can handle showing the
correct ones based on cursor position. As such the 'render' method
is on deprecation path, to be removed fully August 19th. Instead the
new 'parse' method should be defined which returns effectively the
same information
0 commit comments