K Simmons
55b9eff3df
Add cursor blink setting and replicate cursor shape to remote collaborators
2022-10-17 16:20:47 -07:00
Julia
a2e05e3a47
Merge pull request #1768 from zed-industries/git-gutter-meets-code-folding
...
Git gutter meets code folding (and word wrap fixes)
2022-10-17 14:51:47 -04:00
Julia
7abe6bfd4a
Use correct range to get diff hunks in the presence of wrapped lines
2022-10-13 13:52:44 -04:00
Max Brunsfeld
a2c9a67558
Re-export basic text types from text and language crates
...
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Mikayla Maki
a9ce687031
Finished refactoring out fs and rope
2022-10-11 15:25:54 -07:00
Max Brunsfeld
428e05a5fa
Merge pull request #1404 from zed-industries/html-support
...
Basic html support
2022-10-06 10:32:44 -07:00
Max Brunsfeld
225f341f0a
Derive indent size from the language at the cursor when auto-indenting
2022-10-05 17:07:35 -07:00
Max Brunsfeld
fb39256ee5
Remove last usages of MultiBufferSnapshot::language
2022-10-05 14:44:34 -07:00
Julia and Mikayla Maki
1da2b63b97
Move git related things into specialized git crate
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2022-09-29 13:16:02 -04:00
Julia and Mikayla Maki
51d8a04748
WIP Notifying buffers of head text change
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2022-09-29 13:16:02 -04:00
Julia
3eadb80c9a
Fully qualify outside git-related code when a diff is a git diff
2022-09-29 13:16:02 -04:00
Julia
8c17183c5a
Changed diffs to be async and dropped git delay
2022-09-29 13:16:02 -04:00
Julia and Max Brunsfeld
26464ad25b
Update git gutter status after debounced delay
...
Co-authored-by: Max Brunsfeld <max@zed.com >
2022-09-29 13:16:02 -04:00
Julia and Max Brunsfeld
745b30e6e9
Start painting some sort of hunk info, it's wrong but it's close
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-09-29 13:16:01 -04:00
Max Brunsfeld and Julia Risley
09e9b4e1a1
Add Buffer::language_at, update MultiBuffer to use it
...
Co-authored-by: Julia Risley <floc@unpromptedtirade.com >
2022-09-28 12:32:04 -07:00
Antonio Scandurra
89b54e5272
Move operation serialization off the main thread
2022-08-23 16:34:25 +02:00
Antonio Scandurra
ce4bb4e715
Stream buffer ops in the background when creating buffer for peers
2022-08-23 16:05:56 +02:00
ForLoveOfCats and Mikayla
fbea44bc5c
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev >
2022-08-10 16:51:01 -07:00
Max Brunsfeld and Julia Risley
8505231e9a
Start work on auto-indenting lines on tab
...
Co-authored-by: Julia Risley <floc@unpromptedtirade.com >
2022-08-01 16:47:59 -07:00
Max Brunsfeld
75c349243c
🎨 Rename and simplify some autoindent stuff
2022-07-28 22:40:30 -07:00
Max Brunsfeld
357c9d53a9
Record start columns when writing to the clipboard from Zed
2022-07-28 22:13:32 -07:00
Max Brunsfeld and Mikayla Maki
669d716519
Introduce AutoindentMode parameter to Buffer::edit
...
This controls whether or not we preserve the relative indentation
of inserted text blocks.
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com >
2022-07-28 14:03:31 -07:00
Max Brunsfeld and Mikayla Maki
48610f5819
Remove indent_size parameter from Buffer::edit_with_autoindent
...
Instead, compute the indent size by reading the settings inside that method.
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com >
2022-07-28 13:00:05 -07:00
Max Brunsfeld
88efb420e4
Replaces lines_utf16 with a single u32 - last_line_len_utf16
2022-07-25 11:35:42 -07:00
Antonio Scandurra
cb2dfa883e
Introduce MultiBuffer::clip_offset_utf16
2022-07-25 15:06:04 +02:00
Antonio Scandurra
37c4f2bbf3
Introduce Rope::clip_offset_utf16
2022-07-25 15:02:45 +02:00
Antonio Scandurra
daff3fc7f6
Coalesce IME compositions into a single edit
2022-07-25 09:53:51 +02:00
Antonio Scandurra
d103825bc6
Start indexing UTF-16 offsets
...
This is needed because cocoa will report ranges as UTF-16 indices.
2022-07-21 09:40:48 +02:00
Antonio Scandurra
9de9d517fd
Differentiate among tabs with the same name
...
This commit introduces a new, optional `Item::tab_description` method
that lets implementers define a description for the tab with a certain
`detail`. When two or more tabs match the same description, we will
increase the `detail` until tabs don't match anymore or increasing the
`detail` doesn't disambiguate tabs any further.
As soon as we find a valid `detail` that disambiguates tabs enough, we
will pass it to `Item::tab_content`. In `Editor`, this is implemented by
showing more and more of the path's suffix as `detail` is increased.
2022-07-14 11:54:11 +02:00
Keith Simmons
dcc3f6731f
highlight both brackets, only when empty selection, and add test
2022-07-05 15:19:05 -07:00
Keith Simmons
5c67560264
Use NonZeroU32 to ensure settings tabsize cannot be zero
2022-06-23 12:55:38 -07:00
Antonio Scandurra
4d65ad3543
Introduce a new fingerprint field to TextSummary
...
This is calculated in `Rope` and uses the `bromberg_sl2` homomorphic
hash function to determine the fingerprint of a single chunk and
compose each chunk fingerprint into a single fingerprint for the entire
rope that is equivalent to hashing all the rope's bytes at once.
2022-06-17 12:12:37 +02:00
Keith Simmons
5f1e3a5933
Rework hover delay, respect editor font size, and enable hover in multibuffers
2022-06-09 17:03:44 -07:00
Max Brunsfeld
2e11995a75
Merge pull request #1155 from zed-industries/golang
...
Add Go support
2022-06-09 14:18:37 -07:00
Max Brunsfeld
60335c5d1c
Add support for hard tabs
...
* Add a `hard_tabs` setting that causes indentation to be performed
using a tab instead of multiple spaces.
* Change Buffer's indentation-related APIs to return an `IndentSize`
struct with a length and a kind, instead of just a single u32.
* Use hard tabs by default in Go.
2022-06-08 18:30:10 -07:00
Antonio Scandurra
6b02cce095
Expose a unique key: usize in ExcerptBoundary
2022-06-08 15:02:52 +02:00
Antonio Scandurra
6a4995357b
Introduce an optional primary field to ExcerptRange
2022-06-08 12:23:12 +02:00
Antonio Scandurra
cbbdef5434
Extract an ExcerptRange containing a context field in multi_buffer
...
This lays the groundwork for adding an optional `primary` field that can
be supplied to provide the "jump to" feature.
2022-06-08 12:13:04 +02:00
Antonio Scandurra
dc056176f2
Make Buffer::edit and MultiBuffer::edit resilient to inverted ranges
...
Previously, we would accept edits containing out-of-order ranges. When
generating such ranges in our randomized tests, many invariants started
breaking causing e.g. undo/redo to misbehave and operation application
to panic.
In theory, we should never pass inverted ranges, but this commit changes
the above functions to swap the start and the end when that occurs to avoid
breaking the entire system and panicking.
2022-06-06 15:22:36 +02:00
Keith Simmons
be8bfa9592
WIP line mode operations
2022-05-26 17:02:05 -07:00
Max Brunsfeld
d14224a54d
Merge pull request #1027 from zed-industries/missing-menu-commands
...
Add missing File menu commands, improve handling of unsaved multibuffers
2022-05-23 21:29:32 -07:00
Max Brunsfeld
259d76aa40
Start work on handling multibuffers properly when closing unsaved buffers
2022-05-22 16:48:33 -07:00
Antonio Scandurra
1fb594a0ac
Clear multi-buffer redo stack when pushing transaction onto undo stack
2022-05-22 10:44:32 +02:00
Antonio Scandurra
65d11f89f4
Bump FoldSnapshot version if excerpt gets edited outside of its bounds
...
This will cause layers above `FoldMap` to grab a fresh snapshot of the `FoldMap`
and, as a result, of the underlying `MultiBufferSnapshot`. It is a necessary change
because, even though the coordinate space is not affected, a buffer edit taking place
*before* an excerpt range could cause the excerpt buffer rows to change, e.g. if
lines were added or removed. This manifested itself in a randomized test.
2022-05-18 10:13:18 +02:00
Keith Simmons
b03abdb6df
Reduce accessibility of multibuffer read to reduce risk of borrowing snapshot and buffer refcells twice
2022-05-13 16:58:30 -07:00
Keith Simmons
1ba3b210c3
Fix multiple cursors inserting repeated text in multibuffers
2022-05-10 13:32:27 -07:00
Keith Simmons
b2c1230fea
Convert common edit strings to Arc<str> and simplify duplicate line
2022-04-29 14:57:20 -07:00
Keith Simmons
47d4f42467
Consolidate edit and edit_batched functions
2022-04-28 16:52:04 -07:00
Keith Simmons
5051769dd3
Building, but failing test WIP
2022-04-27 17:25:38 -07:00
Max Brunsfeld
b00373f24c
Update breadcrumbs when multibuffers' excerpts change
2022-04-06 17:12:36 -07:00