Commit Graph
474 Commits
Author SHA1 Message Date
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 755636d10e Use NonZeroU32 to ensure settings tabsize cannot be zero 2022-06-23 12:55:38 -07:00
Antonio ScandurraandNathan Sobo 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 ScandurraandMax Brunsfeld 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 ScandurraandMax Brunsfeld 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
Max Brunsfeld 4ce4c0ef03 Ignore completions from gopls that we can't yet handle
We only support additionalEdits if they are provided when resolving the
completion, not if they are provided immediately.
2022-06-09 13:08:08 -07:00
Antonio Scandurra 213b31607c Remove language server statuses synchronously when stopping a server 2022-06-09 10:59:02 +02:00
Antonio Scandurra 69170fc33a Add unit test to ensure changing enable_language_server works 2022-06-09 10:48:06 +02:00
Antonio Scandurra 36a1a7a819 Start/stop language servers when enable_language_server changes 2022-06-09 10:08:11 +02:00
Antonio Scandurra 9d7476afc6 Extract a Project::stop_language_server method when restarting server
This will be useful later to stop a language server when detecting
configuration changes.
2022-06-09 10:05:35 +02:00
Max BrunsfeldandAntonio Scandurra 36ce3eb5ef Handle messages associated with LSP WorkDoneProgress::Begin messages
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-08 10:26:41 -07:00
Antonio Scandurra eda569d6b2 Snapshot file instead of path when creating a buffer snapshot 2022-06-08 14:29:14 +02:00
Antonio Scandurra d8b885e3ec Provide tab_size when formatting document using LSP range formatting 2022-06-08 09:56:11 +02:00
Keith Simmons 9d5111e86a Merge pull request #1078 from zed-industries/lsp-hover
LSP Hover Information
2022-06-07 14:45:43 -07:00
Keith Simmons 1b66e1e185 Add integration test and fix hovering over the wire 2022-06-07 14:22:02 -07:00
Keith Simmons a6c0ee472c Add vim bindings for hover
Allow scrolling in hover popover
2022-06-07 13:07:53 -07:00
Keith Simmons 67d9abc00f Move highlighting to editor code and implement proto message types for hover response 2022-06-07 11:54:52 -07:00
Keith Simmons c7cc07aafb working markdown rendering 2022-06-07 11:54:51 -07:00
Keith Simmons b014352740 Syntax highlighting working. Getting started on markdown support 2022-06-07 11:54:33 -07:00
Isaac Clayton d529a1deb4 Add basic debounce, fix flickering 2022-06-07 11:54:31 -07:00
Keith Simmons 560dff7329 Pull hover popover out of context menu 2022-06-07 11:54:00 -07:00
Isaac Clayton 470c70d394 Get minimal POC working 2022-06-07 11:52:52 -07:00
Antonio ScandurraandMax Brunsfeld b04e62d895 Fix tracking of in-progress disk-based diagnostics on indicator
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-07 19:35:53 +02:00
Antonio ScandurraandMax Brunsfeld bbfa6580a4 Avoid refreshing diagnostics for language servers that didn't update
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-07 19:05:06 +02:00
Antonio Scandurra 1ecc51f035 Fix warnings 2022-06-06 16:23:49 +02:00
Antonio Scandurra 70afc06666 Handle out-of-order edits coming from LSP 2022-06-06 16:15:11 +02:00
Max Brunsfeld ed14fd6e0d Add setting to make projects online/offline by default 2022-06-03 17:01:15 -07:00
Max Brunsfeld 24aafde1e8 Avoid persisting project's state before it has been initialized 2022-06-03 16:40:16 -07:00
Max Brunsfeld e18bc24989 Rename project's 'public'/'private' flag to 'online'/'offline' 2022-06-03 14:39:06 -07:00
Max BrunsfeldandAntonio Scandurra afdd386057 Move persistence and restoration logic from workspace into project
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 11:52:14 -07:00
Max Brunsfeld 36a4d31b5b Keep unregistered projects' ids until pending contact updates are done 2022-06-02 18:04:54 -07:00
Max Brunsfeld f7e7a7c6a7 Use rocksdb to store project paths' public/private state 2022-06-02 17:38:33 -07:00
Max Brunsfeld d45db1718e Style the contact panel while public/private operations are in-flight 2022-06-02 17:38:33 -07:00
Max Brunsfeld d11beb3c02 Change project registration RPC APIs to smooth out UI updates
* Make `UnregisterProject` a request. This way the client-side project can wait
  to clear out its remote id until the request has completed, so that the
  contacts panel can avoid showing duplicate private/public projects in the
  brief time after unregistering a project, before the next UpdateCollaborators
  message is received.
* Remove the `RegisterWorktree` and `UnregisterWorktree` methods and replace
  them with a single `UpdateProject` method that idempotently updates the
  Project's list of worktrees.
2022-06-02 17:32:43 -07:00
Max Brunsfeld 3ea061a11e Allow making projects private 2022-06-02 17:32:42 -07:00
Max Brunsfeld 7ef9de32b1 Show private projects in the contacts panel
Introduce a ProjectStore that lets you iterate through all open projects.
Allow projects to be made public by clicking the lock.
2022-06-02 17:29:11 -07:00
Max Brunsfeld a60fef52c4 Start work on private projects 2022-06-02 17:29:11 -07:00
Antonio Scandurra 6baf8b033b Don't reuse the same diagnostic group id across buffers
This lets us use the group id as the key for an `ElementState`, which
fixes a panic that would occur in project diagnostics when opening it
while there were multiple diagnostic groups with the same id.
2022-06-02 12:05:28 +02:00
Max Brunsfeld b9dc476e74 Avoid sending unnecessary messages for local projects that aren't shared 2022-06-01 14:49:12 -07:00
Antonio Scandurra 339069b1d3 Cap MessageStream buffer size to 1MB
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Antonio Scandurra 354488ebdf Don't eagerly populate copied subdirectory
This can race anyway with snapshot updates, so we just eagerly refresh
the root entry and wait for updates to come in to populate it.
2022-05-31 08:11:07 +02:00
Antonio Scandurra 20e1044d49 Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00