Max Brunsfeld
3973098faf
Exclude hidden worktrees from project's diagnostic summaries
2022-06-28 14:23:24 -07:00
Max Brunsfeld
3f4c0add6a
Allow diagnostics to be published for hidden worktrees
2022-06-28 13:31:04 -07:00
Antonio Scandurra
7787ac3b6c
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
72723ce560
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
ffb933f79a
Merge pull request #1237 from zed-industries/jump-to-definition
...
Mouse jump to definition
2022-06-27 15:20:07 -07:00
Antonio Scandurra
faf645bbe8
Don't stop scanning directory if reading one of the children errors
2022-06-27 08:40:37 +02:00
Keith Simmons
a76be2126c
working jump to definition with tests
2022-06-24 15:09:31 -07:00
Keith Simmons
b2c6087d10
Working underline based on symbol origin
2022-06-24 15:05:35 -07:00
Keith Simmons
5c67560264
Use NonZeroU32 to ensure settings tabsize cannot be zero
2022-06-23 12:55:38 -07:00
Antonio Scandurra and Nathan Sobo
c737c7c3f7
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 and Max Brunsfeld
1a3d3f300c
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
b62f125aa9
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 and Max Brunsfeld
e4981d98ab
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
42064f76b0
Don't compute fingerprint for every text summary
2022-06-17 15:15:27 +02:00
Antonio Scandurra
5ad9e9e6c8
Determine Buffer::is_dirty based on the rope's fingerprint
2022-06-17 12:38:25 +02:00
Antonio Scandurra
306b76e782
Use word boundaries instead of syntax to infer completion edit ranges
2022-06-16 11:27:22 +02:00
Antonio Scandurra
b3b0c32b8c
Add failing test for wrong typescript completion
2022-06-16 11:26:35 +02:00
Antonio Scandurra
e627636760
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
9f53cfb758
Fix delayed lsp request
2022-06-09 17:03:45 -07:00
Max Brunsfeld
2e11995a75
Merge pull request #1155 from zed-industries/golang
...
Add Go support
2022-06-09 14:18:37 -07:00
Max Brunsfeld
3a848da1eb
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
ec99b1ca50
Remove language server statuses synchronously when stopping a server
2022-06-09 10:59:02 +02:00
Antonio Scandurra
e19d19ba7a
Add unit test to ensure changing enable_language_server works
2022-06-09 10:48:06 +02:00
Antonio Scandurra
be274c940e
Start/stop language servers when enable_language_server changes
2022-06-09 10:08:11 +02:00
Antonio Scandurra
bd0a466807
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 Brunsfeld and Antonio Scandurra
23ba55f6ff
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
19047bd204
Snapshot file instead of path when creating a buffer snapshot
2022-06-08 14:29:14 +02:00
Antonio Scandurra
e2d1995010
Provide tab_size when formatting document using LSP range formatting
2022-06-08 09:56:11 +02:00
Keith Simmons
a0328d6eef
Merge pull request #1078 from zed-industries/lsp-hover
...
LSP Hover Information
2022-06-07 14:45:43 -07:00
Keith Simmons
69bc9489f6
Add integration test and fix hovering over the wire
2022-06-07 14:22:02 -07:00
Keith Simmons
7f12bd6bb0
Add vim bindings for hover
...
Allow scrolling in hover popover
2022-06-07 13:07:53 -07:00
Keith Simmons
76104481b6
Move highlighting to editor code and implement proto message types for hover response
2022-06-07 11:54:52 -07:00
Keith Simmons
017e95f782
working markdown rendering
2022-06-07 11:54:51 -07:00
Keith Simmons
2a50811651
Syntax highlighting working. Getting started on markdown support
2022-06-07 11:54:33 -07:00
Isaac Clayton
f14734bc51
Add basic debounce, fix flickering
2022-06-07 11:54:31 -07:00
Keith Simmons
98c402c349
Pull hover popover out of context menu
2022-06-07 11:54:00 -07:00
Isaac Clayton
91acab26b0
Get minimal POC working
2022-06-07 11:52:52 -07:00
Antonio Scandurra and Max Brunsfeld
7aa9895eb1
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 Scandurra and Max Brunsfeld
33183cfdab
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
7cdf47bff7
Fix warnings
2022-06-06 16:23:49 +02:00
Antonio Scandurra
bb4609d280
Handle out-of-order edits coming from LSP
2022-06-06 16:15:11 +02:00
Max Brunsfeld
6830c4ef76
Add setting to make projects online/offline by default
2022-06-03 17:01:15 -07:00
Max Brunsfeld
070c108f4a
Avoid persisting project's state before it has been initialized
2022-06-03 16:40:16 -07:00
Max Brunsfeld
20565017ec
Rename project's 'public'/'private' flag to 'online'/'offline'
2022-06-03 14:39:06 -07:00
Max Brunsfeld and Antonio Scandurra
b431b4b421
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
63f4f00711
Keep unregistered projects' ids until pending contact updates are done
2022-06-02 18:04:54 -07:00
Max Brunsfeld
6263737ec8
Use rocksdb to store project paths' public/private state
2022-06-02 17:38:33 -07:00
Max Brunsfeld
edf7dc615b
Style the contact panel while public/private operations are in-flight
2022-06-02 17:38:33 -07:00
Max Brunsfeld
0591ddd47a
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
4bb17889e8
Allow making projects private
2022-06-02 17:32:42 -07:00