Max Brunsfeld
c261a01c7f
Define theme/ui text style settings in theme crate
2023-05-17 14:44:59 -07:00
Max Brunsfeld and Antonio Scandurra
6708c6cd01
Add is_tab field to chunks
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev >
2023-05-08 19:36:51 +03:00
Nathan Sobo
1e2bec9c25
Merge remote-tracking branch 'origin/main' into into-element
2023-04-21 14:27:25 -06:00
Nathan Sobo and Max Brunsfeld
52d4cc5349
Refine naming of element-related types and traits
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2023-04-21 13:06:37 -06:00
2bd56ab6f0
Rename Drawable::boxed to into_element and make containers generic
...
Multi-element are now generic over any drawable child, which can be converted
into an element.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2023-04-21 12:43:19 -06:00
Antonio Scandurra and Nathan Sobo
a614b9528b
Remove unnecessary lifetime parameter from WindowContext
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2023-04-21 18:06:53 +02:00
Nathan Sobo
f5a86aecdc
WIP
2023-04-12 12:13:35 -06:00
Nathan Sobo
0316747904
WIP
2023-04-12 06:51:03 -06:00
Nathan Sobo
fabf89a1b1
WIP
2023-04-11 18:21:56 -06:00
Nathan Sobo
596940d986
WIP: Everything shredded
2023-04-10 16:10:32 -06:00
Nathan Sobo
5839c594d8
Fix formatting
2023-04-06 15:54:44 -06:00
Nathan Sobo
d937660683
Merge MutableAppContext into AppContext
...
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Antonio Scandurra
963d2209df
Prevent tab from accepting a copilot suggestion when it isn't visible
2023-04-05 10:31:11 +02:00
Antonio Scandurra
9eba3f753f
Make autocompletion and copilot mutually exclusive
2023-04-03 14:15:21 +02:00
Mikayla Maki
2ba0046a08
Merge branch 'main' into copilot
2023-03-30 16:57:18 -07:00
Antonio Scandurra
cf4cdd1b10
Speed up tab searching in TabMap::sync by looking for \t only
...
Instead of looking for `\n` as a stopping condition, we cap the range
we pass to `SuggestionSnapshot::chunks` to stop on the next line. This
makes character searching faster, because looking for a single character
uses `memchr`. Also, this avoids an extra conditional in a tight loop such
as the chunk scanning one contained in `TabMap::sync`.
2023-03-30 10:03:13 +02:00
Antonio Scandurra
91da51e1a2
Use + instead of | to break out of tab expansion in TabMap::sync
2023-03-30 09:49:07 +02:00
Mikayla Maki
2f5eecd9a7
Merge branch 'main' into copilot
2023-03-29 16:57:38 -07:00
Max Brunsfeld
08f8cbd5dc
🎨
2023-03-29 14:43:01 -07:00
Antonio Scandurra
b4b257c131
Make edits smaller when tab expansion changes on a line
2023-03-29 21:40:37 +02:00
Antonio Scandurra
055efa1a6f
Expand edit to end of the line when old/new row exceeds max expansion
2023-03-29 16:49:21 +02:00
Antonio Scandurra
aca38cb8d3
Rename skip_leading_tab to inside_leading_tab
2023-03-29 14:53:28 +02:00
Antonio Scandurra
8df4fb7b81
Increment input_column correctly when inside the leading tab
2023-03-29 14:52:50 +02:00
Max Brunsfeld
4cc50e4935
Don't use TabMap::expand_tabs in line_indent_for_buffer_row
2023-03-28 17:37:57 -07:00
Max Brunsfeld
204c900aa0
Only expand tabs up until a limited column
2023-03-28 16:40:04 -07:00
Max Brunsfeld
ae03435253
🎨 Make expand_tabs and collapse_tabs instance methods on TabSnapshot
2023-03-28 14:10:43 -07:00
Antonio Scandurra
27a5454aee
Rework SuggestionMap to take highlight style when retrieving chunks
2023-03-28 09:42:01 -07:00
Antonio Scandurra
09bb0f131f
Make Suggestion fields public
2023-03-21 16:51:33 +01:00
Antonio Scandurra
c197750411
Integrate SuggestionMap into the rest of DisplayMap
2023-03-21 16:39:02 +01:00
Antonio Scandurra
1a61ea2295
Add a version field to SuggestionSnapshot
2023-03-21 12:47:04 +01:00
Antonio Scandurra
585afd340e
Extract a SuggestionMap::randomly_mutate method
2023-03-21 11:51:06 +01:00
Antonio Scandurra
8532f93bd8
Implement SuggestionSnapshot::to_{fold,suggestion}_point
2023-03-21 11:39:29 +01:00
Antonio Scandurra
4c0ae74607
Implement SuggestionSnapshot::to_point
2023-03-21 11:28:36 +01:00
Antonio Scandurra
f73951495d
Implement SuggestionSnapshot::to_offset
2023-03-21 11:28:33 +01:00
Antonio Scandurra
a0b06cb196
Implement SuggestionSnapshot::text_summary_for_range
2023-03-21 11:28:30 +01:00
Antonio Scandurra
929a5cdf6a
Implement SuggestionSnapshot::clip_point
2023-03-21 11:28:27 +01:00
Antonio Scandurra
fbbfd60bd5
Implement SuggestionSnapshot::buffer_rows
2023-03-21 11:28:23 +01:00
Antonio Scandurra
0792c2501d
Add unit test to verify basic properties of the SuggestionMap
2023-03-21 08:29:33 +01:00
Antonio Scandurra and Max Brunsfeld
b1e5cca4c5
Implement SuggestionSnapshot::line_len
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2023-03-20 19:45:39 +01:00
Antonio Scandurra and Max Brunsfeld
934978471d
Enhance randomized test to verify SuggestionMap::{chunks,sync}
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2023-03-20 19:29:22 +01:00
Antonio Scandurra
bf4656198a
WIP: Flesh out more of the suggestions randomized test
2023-03-20 18:06:24 +01:00
Antonio Scandurra
5223d4c8ab
Start on randomized test and add SuggestionMapSnapshot::chunks
2023-03-20 15:56:15 +01:00
Antonio Scandurra
9e983c9561
Simplify signature of SuggestionMap::replace
2023-03-20 14:00:14 +01:00
Antonio Scandurra
db329dc3bc
Add SuggestionMap::replace
2023-03-20 13:50:14 +01:00
Antonio Scandurra
7473beca88
Start on SuggestionMap
2023-03-20 13:22:14 +01:00
Mikayla Maki
17c20e0684
Merge pull request #2287 from zed-industries/fix-fold-range-finding
...
Fix code folds with wraps
2023-03-17 17:18:56 -07:00
Mikayla Maki and Max
4d4c4ac837
Fix fold tests with new representation
...
Switch UI code from using display rows to using buffer rows
Make folds only show up on lines with line layouts
co-authored-by: Max <max@zed.dev >
2023-03-17 16:00:22 -07:00
Antonio Scandurra
3d6ac2ae58
Don't make fonts::Features Copy
2023-03-17 13:54:56 +01:00
Antonio Scandurra
22cd32e1bc
WIP: Allow specifying font features in the editor
...
This just lays the foundation for threading through a `fonts::Features`
struct, but it's not used yet.
2023-03-17 09:51:36 +01:00
Mikayla Maki and max
7880297c84
Convert code folding to be in terms of buffer points instead of display points
...
Co-authored-by: max <max@zed.dev >
2023-03-14 16:48:03 -07:00