-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a "conceal" feature #5798
Comments
This heavily factors into the recent work I did in #5420 as conceal is technically a superset of the overlay virtual text implemted there. Extending the work there to also render a conceal like feature would be easy. However any conceal like feature requires running treesitter. The positioning code is called very often (much more often the the highlight queries) and I strongly believe should not call TS everytime. Currently virtual text is intended to ne stored on the document. However implementing conceal that way would require running TS for the entire document (not just the visible screen) on every keypress which is also not ok from a performance standpoint. The only way I see this feature being added is by calcuting conceal om idle timeout if the document has changed and smoothing over conceal ranges It"s a fairly nieche feature tough so I think it's important that any solution does not slow down the editor when not used or significantly complicates the core positioning code. |
Conceal is great when editing or composing any markup, e.g. JSON. Would be a great feature to have out of the box in helix. |
Would this be able to be built upon the overlay rendering similar to how the Amp-like jump-to-label ( |
This can be taken a step further to conceal characters even on the current line as long as the cursor is not adjacent to or above those characters. I have seen this behavior in Obsidian note taking app, and personally I prefer this approach. I assume this might be comparatively harder to implement but since we are starting from scratch, it might be worth considering. |
I want to mention that neovim has a long-standing issue where concealer doesn't combo well with line wrap. This can't be resolved as the architecture is not desigend well in the first place. I hope the design of helix's conceal feature is still in early stages so this can be addressed in the design. |
That's not a problem our text positioning and linne wrapping works fundamentally differently and has no issues with things like that |
Vim has a wonderfully helpful "conceal" feature that allows the replacement of arbitrary text with arbitrary other text on lines that are not currently being manipulated. This is exceedingly helpful for editing LaTeX - see the vim-conceal plugin - but it's also helpful for certain other programming languages.
This may perhaps be dependent on a plugin system.
The text was updated successfully, but these errors were encountered: