Commit Graph
10234 Commits
Author SHA1 Message Date
Kirill Bulatov b8874f3700 Merge excerpt-related hint data, move next_inlay_id into Editor 2023-06-29 22:25:49 +03:00
Kirill Bulatov 4d94fd7cf9 Move InlayId generation back to InlayCache 2023-06-29 22:25:49 +03:00
Kirill Bulatov 056da5db21 Properly handle hint addition queries 2023-06-29 22:25:49 +03:00
Kirill Bulatov ddd0f9caf4 Properly handle settings toggle 2023-06-29 22:25:49 +03:00
Kirill Bulatov 02c8e6794b Allow readding inlays with existing ids, move inlay types 2023-06-29 22:25:49 +03:00
Kirill Bulatov 47ccbe8cc3 Generate InlayIds in InlayMap, prepare InlayCache for refactoring 2023-06-29 22:25:49 +03:00
Kirill Bulatov 8fe163ab5d Cleanup the warnings 2023-06-29 22:25:49 +03:00
Kirill Bulatov 4ea380ad72 Use proper, limited excerpt ranges and manage inlay cache properly 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra fea6912681 Fix all the tests
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra c41d6cc815 Fix most of the FoldMap random tests with inlays
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 6dd4947588 Fix all FoldMap tests (without real inlays inside)
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra abac52ddd8 Fix first FoldMap methods after the map move
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra ae5a42744d Fix InlayMap bugs after the map order revers
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov 413216f41c Apply questionable changes to make things compile 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 16e8a92fac Move inlay map to be the first one
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 1d3d9fbd69 Avoid having carriage returns (\r) in inlays
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra ae6b8fdbd7 Remove the SuggestionMap
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra fc7980b1e5 Switch over to inlay map for Copilot suggestions
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Antonio Scandurra 0b3f38ce2c Fix InlayMap::buffer_rows 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 6edf0d49e8 Implement InlayBufferRows properly
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra ad09faa4d8 Fix more inlay_map corner cases and hangings
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 79a4078d91 Fix inlay map tests
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov 1f9e181574 Apply hints setings on startup 2023-06-29 22:25:49 +03:00
Kirill Bulatov 49ac0e0dee Properly update inlay hints when settings are changed 2023-06-29 22:25:49 +03:00
Kirill Bulatov dc9959fca1 Add inlay hint settings 2023-06-29 22:25:49 +03:00
Kirill Bulatov d0c3527705 Store inlays per paths and query on editor open 2023-06-29 22:25:49 +03:00
Kirill Bulatov 851bc593b4 Deserialize more LSP inlay hint information 2023-06-29 22:25:49 +03:00
Kirill Bulatov 5575e4d441 Better rpc inlay hint handling 2023-06-29 22:25:49 +03:00
Kirill Bulatov b6e2805581 Refresh inlays on buffer reopens 2023-06-29 22:25:49 +03:00
Kirill Bulatov b7ba8dce91 Cache anchors from all versions, remove out of range hints 2023-06-29 22:25:49 +03:00
Kirill Bulatov 5c2e30266a Generate proper inlay diffs for splice 2023-06-29 22:25:49 +03:00
Kirill Bulatov 48a219d1cc Query inlay hints for excerpt ranges only 2023-06-29 22:25:49 +03:00
Kirill Bulatov 7ff0df1f95 Display excerpt-ranged hints only 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra dd43426e4a Fix the duplicate hints
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra aa03364d16 Better bias selection for hints that prefix the type
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Antonio Scandurra ad0a5a18ca Simplify InlayMap::splice interface 2023-06-29 22:25:49 +03:00
Antonio Scandurra f19b8c73b2 Fix point/offset translation and clipping in the InlayMap
This makes all randomized tests pass. We're only missing `buffer_rows`
now and we should move the map right above `MultiBuffer` and below `FoldMap`.
2023-06-29 22:25:49 +03:00
Kirill Bulatov 1ff43841df React with inlay updates on excerpt events 2023-06-29 22:25:49 +03:00
Kirill Bulatov d52924862d Reuse the copilot suggestion style for inlays 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 08e709a6eb Fixed inlay hints' edits generation and moved on with the randomized
test

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Antonio Scandurra 4818567278 Make the randomized tests pass
Right now we only check that the text is correct, but I think
we're getting there.
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 73a8b1c751 Fix the randomized tests
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra d12de34a7a Add inlay hint randomization in the text
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra ffe8d639a6 Fix splice edits generation
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 30bb7c056f Generate edits for inlay hints
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 474c3e6c3f Add inlay hints randomized test, fix the errors
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 4e55c7ea59 Implement initial changes reporting for inlay hints
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 53a9b7ddd2 Report the edits per transform summary generated
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 48b754390f Add line_len snapshot method
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 0f2ed21771 Add more InlaySnapshot text summary impls
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00