Commit Graph
31406 Commits
Author SHA1 Message Date
Kirill Bulatov ec8e1aeefe Properly filter out new hints outside of excerpts' visible ranges 2023-06-29 22:25:49 +03:00
Kirill Bulatov fdc6e51357 Deduplicate inlay hints queries with buffer versions 2023-06-29 22:25:49 +03:00
Kirill Bulatov 350798d1b1 Avoid excessive allocations with Arc around excerpt cached inlays 2023-06-29 22:25:49 +03:00
Kirill Bulatov ccfd00e070 Filter away new hints not in excerpt range 2023-06-29 22:25:49 +03:00
Kirill Bulatov fa1196dabf Remove stale cancelled inlay hints workaround 2023-06-29 22:25:49 +03:00
Kirill BulatovandMax Brunsfeld 157922935e Use text anchors as hint position in hints cache
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov 53aeae3a30 Deduplicate LSP requests on multibuffer scroll 2023-06-29 22:25:49 +03:00
Kirill Bulatov 901ff983fd Use proper anchors for remote LSP queries 2023-06-29 22:25:49 +03:00
Kirill Bulatov e1555caaae Simplify hint event management slightly 2023-06-29 22:25:49 +03:00
Kirill Bulatov 9f8a6a2e35 Insert new hints into cache better 2023-06-29 22:25:49 +03:00
Kirill Bulatov 87b0fb2bc6 Box the cache for better performance 2023-06-29 22:25:49 +03:00
Kirill Bulatov e153097ad3 Mitigate odd offset calculations 2023-06-29 22:25:49 +03:00
Kirill Bulatov a555d28a65 Move away heavy inlay computations into background tasks 2023-06-29 22:25:49 +03:00
Kirill Bulatov 684a6a5fa4 Forbid extra inlay updates 2023-06-29 22:25:49 +03:00
Kirill Bulatov 840e53417d Add snapshot version to use when avoiding wrong state updates 2023-06-29 22:25:49 +03:00
Kirill Bulatov db21f8ddc3 Finish modelling 2023-06-29 22:25:49 +03:00
Kirill Bulatov 7dbfa4ca3d Start to model the background threads for InlayHintCache 2023-06-29 22:25:49 +03:00
Kirill Bulatov 0a2f26dcd7 React on multibuffer scrolls again 2023-06-29 22:25:49 +03:00
Kirill Bulatov 804882a6b2 Spawn cache updates in separate tasks 2023-06-29 22:25:49 +03:00
Antonio Scandurra e0b5c9abbe Prevent insertion of empty inlays into InlayMap 2023-06-29 22:25:49 +03:00
Kirill Bulatov c3d31a916e Do not track editor ranges in InlayHintCache 2023-06-29 22:25:49 +03:00
Kirill Bulatov 5faf026423 Fix cache incremental updates 2023-06-29 22:25:49 +03:00
Kirill Bulatov 952872eeca Properly refresh hints on editor open 2023-06-29 22:25:49 +03:00
Kirill Bulatov 5c99f55046 Fix hint querying bugs 2023-06-29 22:25:49 +03:00
Kirill Bulatov c2c83223d5 Finish rest of the inlay cache logic 2023-06-29 22:25:49 +03:00
Kirill Bulatov 045263cf38 Implement inlay hint replaces for conflict-less case 2023-06-29 22:25:49 +03:00
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