Max Brunsfeld
a8a42e4b1f
Merge branch 'main' into prompt-on-close
2022-04-01 15:29:23 -07:00
Max Brunsfeld
055bff7388
Add explanatory comments in unit test for code actions w/ commands
2022-04-01 13:00:06 -07:00
Max Brunsfeld
bedee29a36
Fix clipping when using label-only completions
2022-04-01 12:07:41 -07:00
Max Brunsfeld
5add351d21
Handle LSP apply workspace edit request fully before responding
2022-04-01 11:59:21 -07:00
Max Brunsfeld and Antonio Scandurra
f27f8a5c9e
Allow applying code actions that use commands
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-04-01 10:16:26 -07:00
Antonio Scandurra
340874ce76
Allow explicit reload of buffers via Project::reload_buffers
2022-04-01 14:01:56 +02:00
Max Brunsfeld and Keith Simmons
cc28562c9e
Start work on applying code actions that use commands
...
Co-Authored-By: Keith Simmons <keith@zed.dev >
2022-03-31 22:03:52 -07:00
Max Brunsfeld
df45c44872
Let fake and real LanguageServer access AsyncAppContext in handler callbacks
...
Also, reimplement FakeLanguageServer by wrapping LanguageServer, instead of
duplicating its functionality differently.
2022-03-31 21:57:00 -07:00
Keith Simmons
4e54a09062
Address panic when completions requested and returned to outdated buffer
2022-03-31 18:22:55 -07:00
Keith Simmons and Max Brunsfeld
0468cc5952
Provide diagnostic context to codeAction
...
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-31 15:39:52 -07:00
Keith Simmons
bad4e01909
Add test for common_prefix_at and rewrite it to be more readable and
...
pass the new test cases
2022-03-31 01:09:58 -07:00
Max Brunsfeld and Keith Simmons
8450d218cd
Start work on interpreting 'label/insertText' completions
...
These completions don't supply a range that should be overwritten, so
the client needs to infer it via substring matching.
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-03-30 17:47:25 -07:00
Max Brunsfeld and Keith Simmons
d97a956050
Hard-code LSP formatting options for now
...
This is needed for auto-formatting to work properly in TypeScript and JSON
Co-Authored-By: Keith Simmons <keith@zed.dev >
2022-03-30 17:08:40 -07:00
Max Brunsfeld
199d4d07f5
Merge branch 'main' into typescript
2022-03-30 14:44:07 -07:00
Keith Simmons and Max Brunsfeld
f11b269016
Add assert_set_eq macro to make test clearer
...
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-30 13:53:38 -07:00
Keith Simmons and Max Brunsfeld
801cdde8a7
Test language server restart works as expected
...
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-30 13:08:36 -07:00
Max Brunsfeld
7262c2455b
Move all configuration of individual LSP servers to LspAdapter
2022-03-29 18:14:30 -07:00
Max Brunsfeld
fa6e6fd8fe
Restructure fake language server setup
...
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Keith Simmons
7cedb28a82
Properly dedup restarts of language servers
2022-03-29 17:46:39 -07:00
Keith Simmons
598d2433bf
Add restart-lsp keybinding
2022-03-29 17:24:23 -07:00
Max Brunsfeld
207e166471
Start work on allowing language servers to support multiple languages
2022-03-29 16:57:18 -07:00
Keith Simmons and Max Brunsfeld
3bcc515b7b
Add typescript language server
...
Currently not tested for tsx files
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-29 13:42:21 -07:00
Max Brunsfeld
c6b04f7797
Make language's language server config non-optional
2022-03-28 18:14:49 -07:00
Antonio Scandurra
fb4f218382
Allow returning futures in fake language server request handlers
2022-03-28 10:44:32 +02:00
Nathan Sobo and Antonio Scandurra
a22e44d86c
Clear out project registration and sharing state on disconnect
...
Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-25 10:15:08 -06:00
Antonio Scandurra and Nathan Sobo
f7b13fbc0b
Preserve disk-based diagnostics whose ranges intersect with an edit since save
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-25 15:35:31 +01:00
Antonio Scandurra
a0ca4a13f8
Rename editor::Event::Edited to editor::Event::BufferEdited
...
This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
2022-03-24 08:55:46 +01:00
Nathan Sobo and Max Brunsfeld
8b684e14dc
Don't try keychain after authentication fails
...
Previously, we were achieving this by deleting the keychain item, but this can sometimes fail which leads to an infinite loop. Now, we explicitly never try the keychain when reattempting authentication after authentication fails.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-03-23 12:15:36 -06:00
Antonio Scandurra
2fea8a3cda
Stop following when leader disconnects
2022-03-22 11:16:04 +01:00
Antonio Scandurra
0de3f0980f
Automatically unfollow when editing, scrolling or changing selections
2022-03-22 09:17:01 +01:00
Antonio Scandurra
d37930e006
Serialize initial follow state in leader and reflect it in follower
2022-03-18 10:22:13 +01:00
Max Brunsfeld
6360072b43
WIP
2022-03-17 17:53:49 -07:00
Antonio Scandurra and Nathan Sobo
8392138618
Start defining follow protocol
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 16:50:29 +01:00
Antonio Scandurra and Nathan Sobo
53d7dfb195
Introduce workspace::register_project_item
...
This lets downstream crates like `editor` define how project items should be
opened.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 15:54:34 +01:00
Antonio Scandurra and Nathan Sobo
c9524e63a0
Remove Editor::find_or_create
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 15:13:47 +01:00
Antonio Scandurra
ac220025d8
Rename open_buffer_for_path to open_buffer
2022-03-17 11:42:13 +01:00
Nathan Sobo and Max Brunsfeld
e5b82e80da
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-03-16 17:40:09 -06:00
29ab1f30bc
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Keith Simmons <keith@the-simmons.net >
2022-03-16 15:59:47 -06:00
4c7d18530a
Remove workspace::Item trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Keith Simmons <keith@zed.dev >
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
2022-03-16 13:34:06 -07:00
Antonio Scandurra and Nathan Sobo
1816b44648
Fade out unnecessary code
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-15 15:51:59 +01:00
Antonio Scandurra and Nathan Sobo
f37b22212f
Implement shift-f8 to go to previous diagnostic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-15 15:13:23 +01:00
Max Brunsfeld and Keith Simmons
d5a8001155
Open settings file in new window if current window isn't local
...
Co-Authored-By: Keith Simmons <keith@zed.dev >
2022-03-14 17:12:07 -07:00
Max Brunsfeld
76ef5941e5
Ensure that worktrees' entry ids are unique across the project
...
Fixes #512
2022-03-14 12:36:56 -07:00
Max Brunsfeld
839a7f8782
Start work on relaying settings to language servers
2022-03-11 17:36:27 -08:00
Antonio Scandurra
583377a39d
Don't starve main thread when lots of messages/events arrive at once
2022-03-11 10:09:13 +01:00
Antonio Scandurra
6454b09051
Show the last in-progress task from language servers
2022-03-11 09:59:13 +01:00
Antonio Scandurra
22b3216d65
Extract a LanguageServerStatus struct
2022-03-10 18:43:56 +01:00
Antonio Scandurra
7498e16311
Display language server name in status bar
2022-03-10 16:48:43 +01:00
Antonio Scandurra
00bd2967ae
Render pending language server work in status bar
2022-03-10 16:09:47 +01:00
Antonio Scandurra
212fb05f33
Listen to all LSP progress notifications and broadcast them to peers
2022-03-10 12:00:33 +01:00