Antonio Scandurra and Nathan Sobo
33e4f8f6c3
Allow querying a diagnostic group by its id
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-04 15:16:59 +01:00
Antonio Scandurra and Nathan Sobo
a8f60a10e1
Assign diagnostics a group_id based on their related_information
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-04 14:52:34 +01:00
Nathan Sobo
cdb530c692
Start on a test for grouped diagnostics
2021-11-03 18:47:18 -06:00
Max Brunsfeld
34954ab8b2
Extend empty diagnostic ranges at the ends of lines
2021-11-03 13:49:39 -07:00
Max Brunsfeld
06829caeab
In the status bar, show the diagnostic under the cursor
2021-11-03 12:33:16 -07:00
Antonio Scandurra and Max Brunsfeld
6c5de48e00
Avoid ending the pending selection until updating selections
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-11-03 19:07:06 +01:00
b09850a993
Make resolving selections generic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-11-03 17:51:57 +01:00
Antonio Scandurra
3ea225fc3d
Fix test for disk-based diagnostics
2021-11-03 09:39:15 +01:00
Max Brunsfeld and Nathan Sobo
837244e938
Start language servers based on buffers' languages
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-02 17:41:01 -07:00
Max Brunsfeld
95e6765d21
Avoid using worktree handle in File's path methods
...
This avoids a circular model update that was happening
when trying to retrieve the absolute path from a buffer's
file while applying remote operations.
2021-11-02 14:33:55 -07:00
Max Brunsfeld and Nathan Sobo
355e2bf5c8
Deserialize buffer's diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-02 12:29:03 -07:00
Max Brunsfeld
79a9be0c30
Avoid circular model update when sending diagnostics operations
2021-11-01 17:14:22 -07:00
Max Brunsfeld and Nathan Sobo
0a178d2d15
Replicate diagnostics to remote buffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-01 15:28:37 -07:00
Max Brunsfeld and Nathan Sobo
7270358c7c
Move protobuf logic from buffer crate to language crate
...
This will enable us to add operations that only pertain to the language crate.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-01 14:05:19 -07:00
Max Brunsfeld
26680e30cc
Use Diagnostic struct in buffer's diagnostics multimap
2021-11-01 12:59:01 -07:00
a217f62a7d
Delay quit until language servers are gracefully shut down
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-01 11:57:31 -07:00
Antonio Scandurra
d941e129e7
Take a &clock::Global instead of cloning in edits_since
2021-11-01 10:48:20 +01:00
Antonio Scandurra
e7d5a2af4e
Always notify when receiving buffer operations
...
We had changed it to only emit a notification when the buffer was
actually edited, but we also want to notify when we receive non-edit
operations, such as a selection update.
2021-11-01 10:06:23 +01:00
Antonio Scandurra and Nathan Sobo
fda08984da
Extend empty diagnostic ranges by one character
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-29 19:09:19 +02:00
Antonio Scandurra and Nathan Sobo
8a5bee616d
Communicate with language servers in terms of UTF-16 coordinates
...
This required indexing UTF-16 positions in `Rope`. We tried opting
into the UTF-8 experimental support but it didn't seem to work
correctly and the standard is UTF-16 anyway.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-29 18:33:23 +02:00
Antonio Scandurra
701b86f493
Avoid unnecessary conversion to offsets in diagnostics_in_range
2021-10-29 14:41:41 +02:00
Max Brunsfeld
825fb94fc6
Merge branch 'anchor-map-selections' into lsp
2021-10-28 17:08:06 -07:00
Max Brunsfeld
5cb767e73b
Rename AnchorRangeSet::to_point_ranges -> point_ranges
2021-10-28 16:32:49 -07:00
Max Brunsfeld
769ad74a3d
Fix unit test for on-disk-changes to not rely on selection bias
2021-10-28 16:17:07 -07:00
Antonio Scandurra and Max Brunsfeld
6279e74712
Clip points coming from language server
...
This avoids panicking in Zed if the points they give us are invalid.
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-10-28 19:02:26 +02:00
Antonio Scandurra and Max Brunsfeld
204f8f3367
Ensure start endpoints always come before end endpoints
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-10-28 18:26:32 +02:00
Antonio Scandurra
35aff64b6b
Express multi-cursor edits using the new coordinate space
...
The language server expects that ranges further in the list of edits
account for the impact of prior changes in the edit list.
2021-10-28 13:40:55 +02:00
Antonio Scandurra
ff236917c4
Add a unit test for disk-based diagnostics
2021-10-28 11:37:24 +02:00
Antonio Scandurra
daf928dedf
Sort LSP diagnostics by (start, end)
2021-10-28 11:36:33 +02:00
Nathan Sobo and Max Brunsfeld
85892ad428
Adjust disk-based diagnostics based on edits since the last save
...
Still need to add tests... not sure if this is right yet.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-10-27 18:58:07 -06:00
Antonio Scandurra
7cd7d52899
Update display map snapshots when diagnostics are updated
...
This is similar to what we do when we receive new parse trees from
tree-sitter.
2021-10-27 12:42:16 +02:00
Antonio Scandurra
10ad2d113c
Fix bug in to_full_offset when Anchor::version != Content::version
2021-10-27 11:56:04 +02:00
Max Brunsfeld and Nathan Sobo
c6a85f0009
Include diagnostic info in HighlightedChunks iterator
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-26 17:57:50 -07:00
Max Brunsfeld
fef3c44f4a
Allow retrieving a buffer's diagnostics
2021-10-26 15:46:08 -07:00
Max Brunsfeld
1fe81e3516
Simplify buffer constructor methods
...
Don't expose the `buffer::History` to callers of `language::Buffer`
2021-10-26 14:26:47 -07:00
Max Brunsfeld and Nathan Sobo
499226ae78
Move lsp configuration into language crate
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-26 12:17:51 -07:00
Max Brunsfeld and Nathan Sobo
35886ddcdb
Notify language server when saving a buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-26 11:45:59 -07:00
Antonio Scandurra
a6d95b9652
WIP
2021-10-26 19:42:40 +02:00
Nathan Sobo
0beb4ffe93
Get language and project compiling
2021-10-25 09:26:36 -06:00
6d8aa9f7d8
Assign new file handles on buffers when their files change on disk
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-21 13:08:54 +02:00
8d2d3c0750
Update buffer's saved mtime when file is reloaded after on-disk change
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-10-21 12:05:44 +02:00
Max Brunsfeld
7a3a9575e2
Rename TextBuffer back to Buffer
2021-10-21 11:12:19 +02:00
Max Brunsfeld
3f96f0aa6f
Remove unnecessary dependencies in buffer and language crates
2021-10-21 09:40:50 +02:00
Max Brunsfeld
34cda9fe9b
Extract a language crate
2021-10-20 22:51:40 +02:00