helix-mirror/helix-core/src
Pascal Kuthe 4c7cdb8fea
Improve line annotation API
The line annotation as implemented in #5420 had two shortcomings:
* It required the height of virtual text lines to be known ahead time
* It checked for line anchors at every grapheme

The first problem made the API impractical to use in practice because
almost all virtual text needs to be softwrapped. For example inline
diagnostics should be softwrapped to avoid cutting off the diagnostic
message (as no scrolling is possible). While more complex virtual text
like side by side diffs must dynamically calculate the number of empty
lines two align two documents (which requires taking account both
softwrap and virtual text). To address this, the API has been
refactored to use a trait.

The second issue caused some performance overhead and unnecessarily
complicated the `DocumentFormatter`. It was addressed by only calling
the trait mentioned above at line breaks (instead of always). This
allows offers additional flexibility to annotations as it offers
the flexibility to align lines (needed for side by side diffs).
2024-07-15 16:34:14 +02:00
..
doc_formatter track char_idx in DocFormatter 2024-07-15 16:34:13 +02:00
increment Use non-deprecated chrono Duration functions 2024-03-14 14:13:56 +09:00
syntax Use new in-crate TreeCursor 2024-04-09 10:33:15 -04:00
auto_pairs.rs Fix erroneous indent between closers of auto-pairs (#5330) 2022-12-29 09:23:40 -06:00
chars.rs Revert "Replace unicode-general-category with icu-properties (#10989)" (#11006) 2024-06-23 10:05:53 +09:00
comment.rs toggling of block comments (#4718) 2024-02-27 22:36:25 +09:00
config.rs Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00
diagnostic.rs use newtype parttern for langauge server id 2024-04-22 12:27:47 +09:00
diff.rs delete outdated reference to cessen/ropey#25 (#4928) 2022-11-28 19:07:47 -06:00
doc_formatter.rs Improve line annotation API 2024-07-15 16:34:14 +02:00
fuzzy.rs Bump nucleo to v0.4.1 2024-07-15 09:31:32 -04:00
graphemes.rs don't manually grapheme align ts highlights (#10310) 2024-04-11 00:14:08 +09:00
history.rs Prefer RopeSlice to &Rope in helix_core::syntax 2023-07-27 11:50:19 +09:00
indent.rs Resolve new Clippy lints 2024-05-07 15:15:52 -04:00
lib.rs Convert LSP URIs into custom URIs 2024-07-15 09:31:33 -04:00
line_ending.rs Add config for default line ending (#5621) 2023-06-16 12:02:15 -05:00
macros.rs Split parts of helix-term into helix-view. 2020-09-21 18:24:16 +09:00
match_brackets.rs Add curly single and double quotes to BRACKETS (#10971) 2024-06-18 10:40:19 +02:00
movement.rs Respect injections in movement::move_parent_node_end 2024-01-28 18:13:33 +09:00
object.rs specify direction for select_prev_sibling and select_next_sibling (#10542) 2024-04-23 08:41:03 -05:00
position.rs track char_idx in DocFormatter 2024-07-15 16:34:13 +02:00
rope_reader.rs search buffer contents during global search (#5652) 2023-07-11 21:26:11 +09:00
search.rs Jump to the next number on the line before incrementing (#1778) 2022-04-01 22:14:37 +09:00
selection.rs Minor improvements to comments in selection.rs (#11101) 2024-07-07 02:40:23 +09:00
shellwords.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
surround.rs test: match around closest pair tree-sitter version 2024-04-24 16:36:13 -04:00
syntax.rs tree-sitter: Update parent links on reused injection layers (#10978) 2024-06-23 10:06:15 +09:00
test.rs fix test::plain 2023-03-20 18:34:40 -05:00
text_annotations.rs Improve line annotation API 2024-07-15 16:34:14 +02:00
textobject.rs test: match around closest pair tree-sitter version 2024-04-24 16:36:13 -04:00
transaction.rs Resolve new Clippy lints 2024-05-07 15:15:52 -04:00
uri.rs Convert LSP URIs into custom URIs 2024-07-15 09:31:33 -04:00
wrap.rs don't break on hyphen with :reflow (#8569) 2023-10-21 07:58:36 -05:00