Antonio Scandurra
d3b9eca791
Merge branch 'main' into user-timeline
2022-07-04 09:23:16 +02:00
Antonio Scandurra
0b2452f666
Merge pull request #1265 from zed-industries/worktree-performance
...
Fix problems that arise when large numbers of files change on disk
2022-07-04 09:19:18 +02:00
Antonio Scandurra
aca757a02d
Don't poll snapshot if processing events unless user manually changed fs
2022-07-04 08:10:31 +02:00
Antonio Scandurra
cf05738f68
Remove redundant calls to poll_snapshot
2022-07-01 14:40:39 +02:00
Antonio Scandurra
a42399bcf3
Grab latest snapshot when invoking LocalWorktree::poll_snapshot
2022-07-01 14:36:51 +02:00
Antonio Scandurra
833aa726d5
🎨
2022-07-01 14:11:21 +02:00
Keith Simmons
ebe733a393
Restart language server using original root path rather than the path of the buffer restarted from
2022-06-30 19:11:21 -07:00
Max Brunsfeld
8a105bf12f
WIP - try representing snapshots_to_send as a watch
2022-06-30 18:04:31 -07:00
Keith Simmons
832cc3dd19
Clear language server id for all worktrees when stopping a language server
2022-06-30 17:50:30 -07:00
Keith Simmons
6b50dda28a
Fix failing test due to change in stop_language_server function
2022-06-30 17:40:50 -07:00
Keith Simmons
38ca4aab31
add assertion to test_definition ensuring no new language servers are created
2022-06-30 17:24:32 -07:00
Keith Simmons
37b75132b7
Minor comment change
2022-06-30 17:18:28 -07:00
Keith Simmons
f495185a4e
add a comment explaining the three language server collections on project
2022-06-30 17:09:23 -07:00
Keith Simmons
5e7651e92e
Kill starting servers as well as currently running ones
2022-06-30 17:00:29 -07:00
Keith Simmons
db05e32389
Prevent creating extra language server instances if there already exists one for that workspace
2022-06-30 16:46:26 -07:00
Max Brunsfeld
5fdbc38f46
Don't update worktrees' snapshots in the middle of processing fs events
2022-06-30 15:46:31 -07:00
Max Brunsfeld
b81135e10b
Stop waiting for snapshot updates when disconnected from host
2022-06-30 15:07:40 -07:00
Antonio Scandurra
4ee8ee5a06
Ensure newer snapshots are always detected in wait_for_snapshot
2022-06-30 18:04:19 +02:00
Antonio Scandurra
484af8c7c4
Split worktree updates when a peer joins an already-shared project
2022-06-30 16:49:56 +02:00
Antonio Scandurra
845c79ee05
Respond to join project request before sharing project completes
...
This ensures the guest doesn't observe a huge delay when joining.
2022-06-30 14:29:06 +02:00
Antonio Scandurra
09bb3ddeb8
Split worktree updates and only send 256 entries at a time
2022-06-30 14:06:41 +02:00
Antonio Scandurra
5df0a6a425
Coalesce as many fs events as possible before processing them
2022-06-30 10:20:46 +02:00
Antonio Scandurra
b96962005e
Keep looking for a newer snapshot before broadcasting it
2022-06-30 09:54:14 +02:00
Max Brunsfeld
b5d862abfe
Only send one UpdateProject msg when changing project's online status
2022-06-29 17:58:02 -07:00
Antonio Scandurra
7bae759a02
Send extension counts when metadata changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-29 17:58:11 +02:00
Antonio Scandurra
d1cdacdf14
Skip ignored entries when recording worktree extensions
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-29 17:00:16 +02:00
Antonio Scandurra
639cd71a3b
Record worktree extensions every 5 minutes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-29 16:58:19 +02:00
Antonio Scandurra
f9e0fec396
Maintain extension counts on local worktrees
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-29 16:38:24 +02:00
Antonio Scandurra
09f4262fd4
Don't share a project unless it's online and we're allowing a request
2022-06-29 15:16:55 +02:00
Antonio Scandurra
e3cfc7b3ce
Register project activity for offline projects as well
2022-06-29 14:55:04 +02:00
Max Brunsfeld
8fe6809932
Exclude hidden worktrees from project's diagnostic summaries
2022-06-28 14:23:24 -07:00
Max Brunsfeld
f05e94d0de
Allow diagnostics to be published for hidden worktrees
2022-06-28 13:31:04 -07:00
Antonio Scandurra
ca1d0a6e59
Ignore tokens that were not created via WorkDoneProgressCreate
...
With the new version of rust-analyzer, we were seeing stray `WorkDoneProgress::End`
messages that create an imbalance in the `pending_diagnostic_updates` that never
resolves. This was causing the diagnostic status bar item to never update because
we wouldn't emit `DiskBasedDiagnosticsStarted` nor `DiskBasedDiagnosticsFinished`.
This commit fixes the above situation by only acknowledging progress report for tokens
that have explicitly been created via the `WorkDoneProgressCreate` request, as stated
by the protocol.
In addition to that, we are replacing the `pending_diagnostic_updates: isize` with
a `has_pending_diagnostic_updates: bool`. We added it at some point to prevent a similar
issue where we would observe begin/end reports in a seemingly random order, which would cause
us to permanently display a `checking...` message in the status bar. I believe this commit
fixes that as well because the `isize` was just a less general solution for the same
underlying issue. As the protocol states: "the token provided in the create request should
only be used once (e.g. only one begin, many report and one end notification should be sent
to it)."
2022-06-28 10:08:43 +02:00
Keith Simmons
a477733bcb
Address hover panic and add hint to install go when language server failed to install
2022-06-27 15:48:15 -07:00
Keith Simmons
bc82d98ae5
Merge pull request #1237 from zed-industries/jump-to-definition
...
Mouse jump to definition
2022-06-27 15:20:07 -07:00
Antonio Scandurra
7bfd7093b1
Don't stop scanning directory if reading one of the children errors
2022-06-27 08:40:37 +02:00
Keith Simmons
92ab107fc9
working jump to definition with tests
2022-06-24 15:09:31 -07:00
Keith Simmons
848445455d
Working underline based on symbol origin
2022-06-24 15:05:35 -07:00
Keith Simmons
755636d10e
Use NonZeroU32 to ensure settings tabsize cannot be zero
2022-06-23 12:55:38 -07:00
Antonio Scandurra
2cb8a3ccfb
Don't override top-level settings with language defaults
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-23 16:40:57 +02:00
Antonio Scandurra
2d8ffbdfa2
Don't wait for host's worktree updates if they disconnected
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-22 19:45:55 +02:00
Antonio Scandurra
2f09a4af16
Update project metadata when releasing a worktree's weak handle
...
When a project was getting unshared, we would remove invisible worktrees
from the project's state without notifying the server, which was causing
the randomized tests to fail.
This commit calls `Project::remove_worktree` when a worktree's handle gets
released. Doing so ensures that we update both our local metadata database
as well as the state on the server.
2022-06-22 10:26:10 +02:00
Antonio Scandurra
69aa3d848e
Report running language servers when sharing project for the first time
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-21 20:39:54 +02:00
Antonio Scandurra
4f215a77cd
Don't compute fingerprint for every text summary
2022-06-17 15:15:27 +02:00
Antonio Scandurra
6f7a893ec9
Determine Buffer::is_dirty
based on the rope's fingerprint
2022-06-17 12:38:25 +02:00
Antonio Scandurra
dc75b70724
Use word boundaries instead of syntax to infer completion edit ranges
2022-06-16 11:27:22 +02:00
Antonio Scandurra
35889add40
Add failing test for wrong typescript completion
2022-06-16 11:26:35 +02:00
Antonio Scandurra
3a1d0dd692
Track active projects in metrics
...
An active project is defined as a project where there has been at
least a buffer edit, a join request/response, or a follow update
in the last minute.
2022-06-15 10:33:20 +02:00
Keith Simmons
93158bfcff
Fix delayed lsp request
2022-06-09 17:03:45 -07:00
Max Brunsfeld
87ba68e3ea
Merge pull request #1155 from zed-industries/golang
...
Add Go support
2022-06-09 14:18:37 -07:00