Antonio Scandurra
682ac9d92c
Merge pull request #589 from zed-industries/fold-map-test-failures
...
Avoid re-using excerpt IDs in `MultiBuffer`
2022-03-12 17:59:48 +01:00
Antonio Scandurra
c3ac7e639b
Account for all excerpts ever inserted when determining new excerpt ID
2022-03-12 17:50:09 +01:00
Antonio Scandurra
4ee1f2dfc4
Fix bug in selection position maintenance while renaming symbol
...
We were resolving the selection with the wrong buffer, which now
causes a panic because we don't check the anchor's `buffer_id` anymore.
2022-03-12 13:03:45 +01:00
Max Brunsfeld
d2a4b6888c
Store settings as a global via a gpui app_state
2022-03-11 15:58:58 -08:00
Nathan Sobo
f2451665af
On rename, replace background highlights with transparent text highlights
2022-03-11 15:54:17 -07:00
Nathan Sobo
2c6d8e9d65
Merge branch 'main' into select-on-rename
2022-03-11 15:30:07 -07:00
Keith Simmons and Max Brunsfeld
1c794540cb
Merge pull request #576 from zed-industries/cursor-shape
...
Add support for rendering the cursor as a Block and Underscore
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-11 11:51:24 -08:00
Antonio Scandurra
f74035bd29
💄
2022-03-11 17:13:28 +01:00
Antonio Scandurra
1a5f0456e6
Assume the anchor is valid if we can find an excerpt that contains it
2022-03-11 17:08:12 +01:00
Nathan Sobo and Antonio Scandurra
c598628f94
Don't reuse excerpt ids in MultiBuffer
...
This prevents anchors from swapping their ordering, which was causing issues in FoldMap.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-11 08:50:50 -07:00
Antonio Scandurra
092abbe39b
Respect excerpt's range when comparing two anchors both belonging to it
2022-03-11 12:42:22 +01:00
Keith Simmons
fb3d7986cb
Add unwrap check if buffer_line not available
2022-03-10 20:04:16 -08:00
Nathan Sobo
eddd356051
Focus in-progress rename editor when editor is focused
2022-03-10 16:42:20 -07:00
Nathan Sobo
fe88d384a5
When renaming, match the color of the renamed token in the rename editor
2022-03-10 16:38:45 -07:00
Nathan Sobo
799d1c90cb
Remove unused variable
2022-03-10 15:27:29 -07:00
Nathan Sobo
ebdba1d0c8
When renaming, fade out the old name and select all
2022-03-10 14:55:31 -07:00
Keith Simmons
7ff8aa152f
swap default cursor shape back to bar
2022-03-10 13:28:13 -08:00
Keith Simmons
40518148e1
Fix failing gpui test from missing cursor shape
2022-03-10 13:20:45 -08:00
Keith Simmons
9a43037620
render character under block cursor
2022-03-10 13:16:31 -08:00
Nathan Sobo
1e76d109a3
WIP
2022-03-10 11:32:14 -07:00
Antonio Scandurra
518662da6d
Delete till previous tabstop when backspacing within indent column
2022-03-10 10:28:24 +01:00
Keith Simmons
30b1b1e0c5
fix formatting
2022-03-10 01:09:25 -08:00
Keith Simmons
4a962e3101
Add support for rendering cursors as a block and underscore
2022-03-10 01:09:02 -08:00
Nathan Sobo
150fdc71af
Start on text highlight support
2022-03-09 20:51:35 -07:00
Nathan Sobo
52eabf6231
Eliminate ToFoldPoint trait
...
Just make it a method on FoldMap
2022-03-09 20:49:18 -07:00
Antonio Scandurra
49b3d39a97
Merge pull request #569 from zed-industries/refine-autoclose
...
Refine bracket auto-closing behavior
2022-03-09 16:28:35 +01:00
Antonio Scandurra
d86c2488eb
💄
2022-03-09 15:44:58 +01:00
Antonio Scandurra
e9d64e7668
Surround selections with brackets when they are non-empty
2022-03-09 15:41:54 +01:00
Antonio Scandurra
8e4b5183a5
Autoclose bracket only if next char is whitespace or the end of a pair
2022-03-09 15:38:17 +01:00
Max Brunsfeld
bfc721db27
Assign buffer's completion triggers from LSP capabilities
...
Also, make LanguageServer::new() async. The future resolves
once the server is initialized.
2022-03-08 17:41:52 -08:00
111d5305ea
Remove language servers from buffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
Co-Authored-By: Keith Simmons <keith@zed.dev >
2022-03-08 15:16:07 -08:00
Antonio Scandurra
a8a5865e56
Open untitled buffers via the Project
...
This allows the registration of such buffers in the project, which is necessary
to correctly support `::save_buffer_as` and opens the door to sharing untitled
buffers with guests in the future.
Note that, for now, this disallows guests to create untitled buffers in the
current window and will create a new window instead. This is because we don't
yet have a global way of allocating a buffer's remote id (nor a way of saving
such buffers in the host's worktree) and we instead rely on the local model ID,
which could clash with the host's buffer IDs.
I think we should revisit this once guests can share their untitled buffers
with the host and other remote peers, as well as once we start keying
operations by entry id.
2022-03-04 15:25:39 +01:00
Antonio Scandurra
3ad7272559
Merge pull request #525 from zed-industries/preserve-worktrees
...
Grow worktrees monotonically when sharing and move most messages to the background
2022-03-04 09:48:18 +01:00
Max Brunsfeld
3a1a9ecb45
Disable doctests for all libraries
...
We don't use them, and they add a lot of noise to the test output
when running all tests in the workspace.
2022-03-03 16:15:56 -08:00
Antonio Scandurra and Max Brunsfeld
819bf72dfc
Rename weak to visible
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-03-02 14:38:16 -08:00
Antonio Scandurra
79568c471a
Pass a reference to TestAppContext in tests
...
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Nathan Sobo
5f24a95e7e
Make versions oldest_selection and newest_selection that don't require snapshots
...
I thought I needed this but actually didn't, but I still kinda think it's a good change for the public interface of Editor.
2022-02-27 13:02:09 -07:00
Nathan Sobo
d66a460a8d
Clone editor's searchable state on split
2022-02-27 09:48:46 -07:00
Nathan Sobo
e8eeccda88
Remove carriage returns
2022-02-27 07:47:46 -07:00
Nathan Sobo
08409a57ed
Allow a new search to be created with cmd-enter
...
This replaces the `cmd-alt-shift-F` binding to open a new search. Instead, you can preserve the existing search results by entering a query and then hitting `cmd-enter` instead of `enter`. This opens a new project find view and restores the previous view to whatever query it was previously displaying. It's a bit strange, but I don't want to rely on splitting as the only way of creating multiple sets of search results.
2022-02-26 13:23:05 -07:00
Antonio Scandurra
c311f59dca
🎨
2022-02-26 14:31:36 +01:00
Nathan Sobo
47088e9bf4
Only store one nav history entry when opening excerpts
...
Also: Introduce the ability to disable and enable the nav history directly. This allows us to explicitly push an entry when opening excerpts and then disable all pushes as we open individual buffers.
2022-02-25 19:26:15 -07:00
Nathan Sobo and Max Brunsfeld
b212b31d0a
Open excerpts on alt-enter
...
Also: Remove special handling for alt-shift-D binding in diagnostics view that opens excerpts. Rely on alt-enter in all multi-buffers instead.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-02-25 16:49:28 -07:00
Nathan Sobo and Max Brunsfeld
1b9c112890
Don't show buffer search UI on ProjectSearchView
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-02-25 16:14:45 -07:00
Antonio Scandurra and Max Brunsfeld
55ec98b42c
Don't assume that cloning on split will reuse the same underlying model
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-02-25 18:30:04 +01:00
Antonio Scandurra and Nathan Sobo
15852294ea
Don't share query editor state after project find has been split
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-25 18:10:48 +01:00
Antonio Scandurra
d15fb9c3dc
Use the new split pane's navigation history when cloning an item
2022-02-25 17:22:30 +01:00
Antonio Scandurra
531fab9035
Always sync before clearing or removing excerpts from MultiBuffer
...
We don't have any test that proves this is needed but seems good nonetheless.
2022-02-25 15:36:43 +01:00
Antonio Scandurra
7522fa71a4
Gracefully handle passing an empty set of ranges to push_excerpts
2022-02-25 15:36:16 +01:00
Antonio Scandurra and Nathan Sobo
240e42d2ff
Refine project find's UX
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-25 15:27:34 +01:00