Commit Graph
2963 Commits
Author SHA1 Message Date
Max BrunsfeldandNathan Sobo 47b654063e Provide editor styling information separately from editor settings
* Since regular editors' font sizes and families are controlled by
  the settings and not the theme, don't store a dummy text style in
  the theme. Instead, only store a font color, and synthesize
  the text style for regular editors using both the theme and the
  settings.
* Style single-line and auto-height editors (now called "field
  editors") using a single function that takes the entire theme and
  selects a relevant sub-object.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-24 16:42:00 -08:00
Antonio Scandurra 39ebaebd83 Merge pull request #486 from zed-industries/background-highlights
Move `GetDocumentHighlights` to the background and fix collaboration race conditions
2022-02-24 10:17:28 +01:00
Antonio Scandurra d929819c33 Fix warning 2022-02-24 09:52:25 +01:00
Antonio Scandurra 8fa23c702c Store ops if buffer handle can't be upgraded and buffer requests are in-flight 2022-02-24 09:32:31 +01:00
Max Brunsfeld a6613d5345 Store operations for unknown buffers when there are outstanding buffer RPC requests 2022-02-23 20:35:05 -08:00
Max Brunsfeld f1921c8df5 Open buffers from definitions request in random collab test
Don't try to open buffers from the weak worktrees directly, as this is
expected to fail if the host drops the buffer for that worktree.
2022-02-23 20:35:05 -08:00
Max Brunsfeld 51e2e9e68d Make client log message format more consistent 2022-02-23 18:18:52 -08:00
Max Brunsfeld 6060077444 Remove unused pending_updates field from RemoteWorktree 2022-02-23 16:59:39 -08:00
Max Brunsfeld e9009d4edf Tweak logging in random collaboration test 2022-02-23 16:27:34 -08:00
Max Brunsfeld e714b00c26 Improve logging around handling RPC requests on client 2022-02-23 15:37:51 -08:00
Max BrunsfeldandNathan Sobo 170487a528 Fix race conditions with LSP requests that return buffers
* Avoid panic when registering a buffer that was previously open,
  and whose weak handle was still present in the open_buffers map.
* Avoid releasing any buffers while a request is outstanding which
  could return a reference to a buffer.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-23 15:26:01 -08:00
17c9aa1819 Remove ShareWorktree message
Instead, create an empty worktree on guests when a worktree is first *registered*, then update it via an initial UpdateWorktree message.

This prevents the host from referencing a worktree in definition RPC responses that hasn't yet been observed by the guest. We could have waited until the entire worktree was shared, but this could take a long time, so instead we create an empty one on guests and proceed from there.

We still have randomized test failures as of this commit:

SEED=9519 MAX_PEERS=2 ITERATIONS=10000 OPERATIONS=7 ct -p zed-server test_random_collaboration

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-23 11:56:09 -07:00
Antonio Scandurra d1b4384f80 WIP 2022-02-23 19:04:22 +01:00
8440644dc9 Remove update_id from worktree update messages
We don't need this anymore because worktree updates are foreground
messages.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-02-23 18:35:25 +01:00
Antonio Scandurra f3c6320eeb Move document highlights RPC message to the background 2022-02-23 16:16:02 +01:00
Antonio Scandurra 9e173564e9 Pass an AsyncAppContext to fake language server request handlers 2022-02-23 16:14:36 +01:00
Nathan Sobo 73fcebb8b2 Bump protocol version 2022-02-23 06:33:31 -07:00
Nathan Sobo 9841abf402 v0.17.0 2022-02-23 06:26:45 -07:00
Antonio Scandurra 6f77ede38e Merge pull request #483 from zed-industries/document-highlights
Show document highlights from the language server when moving the cursor
2022-02-23 10:38:15 +01:00
Max Brunsfeld e140f70e3c Show document highlights from the language server when moving the cursor 2022-02-22 17:16:31 -08:00
Max Brunsfeld 0aeb23519f Merge pull request #481 from zed-industries/find-usages
Find-all-references
2022-02-22 15:10:47 -08:00
Max BrunsfeldandNathan Sobo 25d45378e4 Implement find-all-references
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 14:27:16 -08:00
Max Brunsfeld a925df8696 Merge pull request #479 from zed-industries/project-symbols
Project symbols
2022-02-22 14:25:46 -08:00
Max BrunsfeldandNathan Sobo 6be4b1ef6a Don't select entire item when jumping to a project symbol
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 12:56:43 -08:00
Max BrunsfeldandNathan Sobo 5d2201c4ca Add integration test for project symbols
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 12:44:17 -08:00
Max BrunsfeldandNathan Sobo 669fe775df Normalize paths passed to the FakeFs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 12:43:56 -08:00
Max BrunsfeldandNathan Sobo dbe9c54857 Request definitions as guests in random collaboration integration test
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 12:03:45 -08:00
64098247cb Allow languages to be registered at any time
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-22 10:35:20 -08:00
d7db3791d5 Show worktree root name for symbol when there are multiple worktrees
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-02-22 18:57:41 +01:00
0e4bd4b418 Sign symbols so that we can trust opening buffers for them from guests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-02-22 18:43:16 +01:00
Antonio ScandurraandNathan Sobo fad335b2ba Don't serialize the full LSP symbol when collaborating
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 18:08:43 +01:00
Antonio ScandurraandNathan Sobo 72ad3c2897 Render paths in ProjectSymbolsView
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 17:48:14 +01:00
Antonio Scandurra f0195ac3a3 Allow opening of buffers associated with a project symbol 2022-02-22 16:26:01 +01:00
Antonio Scandurra 2a6d486d14 Retrieve project symbols over RPC 2022-02-22 14:50:06 +01:00
Antonio Scandurra ab73343323 WIP: Start on getting project symbols over RPC 2022-02-22 12:15:38 +01:00
Antonio Scandurra 326f1f43fe Syntax-highlight symbols based on their kind 2022-02-22 12:00:16 +01:00
Antonio Scandurra d59ebb554b Update symbol matches as the query changes 2022-02-22 10:54:25 +01:00
Antonio Scandurra 8a8ae0fbcd Rename CompletionLabel to CodeLabel and add Project::symbols
This only works locally for now and we haven't implemented the
`RustLsp::label_for_symbol` method yet.
2022-02-22 10:01:08 +01:00
Antonio Scandurra 8f375a5026 Start on a new project_symbols crate 2022-02-22 08:42:12 +01:00
Nathan Sobo 882756d467 Merge pull request #475 from zed-industries/filter-input
Don't insert input in editor when control keys are pressed
2022-02-21 18:32:53 -08:00
Nathan Sobo 618f0a127a Don't insert input in editor when control keys are pressed 2022-02-21 18:21:27 -07:00
Nathan Sobo 7cd5dbd2a8 v0.16.0 2022-02-21 18:10:10 -07:00
Nathan Sobo c752383042 Merge pull request #459 from zed-industries/spurious-macro-errors
Download language servers dynamically on startup
2022-02-21 17:08:50 -08:00
Nathan Sobo 99594333a5 Log an error instead of panicking when there's no LSP download dir 2022-02-21 17:44:00 -07:00
Max BrunsfeldandNathan Sobo 03ec6e11b7 Assign language server download directory on startup
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 16:23:38 -08:00
Max BrunsfeldandNathan Sobo 79910ba931 Show more information in lsp status bar item
* Distinguish between checking for updates and downloading
* Show dismissable error message when downloading failed and there
  is no cached server.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 16:11:51 -08:00
Max BrunsfeldandNathan Sobo ededfff3a8 Download language servers on-demand
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 13:54:52 -08:00
66c69e538e Don't offset text vertically with gutter margin
Fixes #467

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-02-21 11:41:46 -07:00
Nathan Sobo 4295df1603 Merge pull request #457 from zed-industries/find-improvements
Find improvements
2022-02-21 10:34:49 -08:00
Antonio Scandurra db23a87228 Revert "Temporarily allow uploading artifacts on all branches"
This reverts commit 794fcba842.
2022-02-21 18:04:29 +01:00