Commit Graph
943 Commits
Author SHA1 Message Date
Kirill Bulatov 480d8c511b Theme hints and suggestions differently 2023-06-29 22:39:18 +03:00
Kirill Bulatov 096bad1f73 Revert useless changes, simplify 2023-06-29 22:25:50 +03:00
Kirill Bulatov acef5ff195 Query hints when editors gets open and visible 2023-06-29 22:25:50 +03:00
Kirill Bulatov 11fee4ce42 Do not eagerly cancel running tasks 2023-06-29 22:25:49 +03:00
Kirill Bulatov 4d4544f680 Split excerpts into mutliple ranges for inlay hint queries 2023-06-29 22:25:49 +03:00
Kirill Bulatov 2c7900e11b Use excerpt visible range in query filtering 2023-06-29 22:25:49 +03:00
Kirill Bulatov 890b164278 Forward inlay hint refresh requests to clients, test coop inlay hints 2023-06-29 22:25:49 +03:00
Kirill Bulatov a68e68a0d9 Properly filter out new hints outside of excerpts' visible ranges 2023-06-29 22:25:49 +03:00
Kirill Bulatov ba3d1e4dba Deduplicate inlay hints queries with buffer versions 2023-06-29 22:25:49 +03:00
Kirill Bulatov f25a09bfd8 Avoid excessive allocations with Arc around excerpt cached inlays 2023-06-29 22:25:49 +03:00
Kirill BulatovandMax Brunsfeld 96a34ad0ee 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 781fa0cff4 Deduplicate LSP requests on multibuffer scroll 2023-06-29 22:25:49 +03:00
Kirill Bulatov cb4b92aa61 Simplify hint event management slightly 2023-06-29 22:25:49 +03:00
Kirill Bulatov 7fddc223cd Move away heavy inlay computations into background tasks 2023-06-29 22:25:49 +03:00
Kirill Bulatov 31f0f9f7b1 Forbid extra inlay updates 2023-06-29 22:25:49 +03:00
Kirill Bulatov 8d982a6c2d Finish modelling 2023-06-29 22:25:49 +03:00
Kirill Bulatov 4c78019317 Start to model the background threads for InlayHintCache 2023-06-29 22:25:49 +03:00
Kirill Bulatov 2f1a27631e React on multibuffer scrolls again 2023-06-29 22:25:49 +03:00
Kirill Bulatov a31d3eca45 Spawn cache updates in separate tasks 2023-06-29 22:25:49 +03:00
Kirill Bulatov 3b9a2e3261 Do not track editor ranges in InlayHintCache 2023-06-29 22:25:49 +03:00
Kirill Bulatov 70a45fc800 Fix cache incremental updates 2023-06-29 22:25:49 +03:00
Kirill Bulatov 7ac1885449 Properly refresh hints on editor open 2023-06-29 22:25:49 +03:00
Kirill Bulatov 58343563ba Fix hint querying bugs 2023-06-29 22:25:49 +03:00
Kirill Bulatov debdc3603e Finish rest of the inlay cache logic 2023-06-29 22:25:49 +03:00
Kirill Bulatov 8c03e9e122 Move InlayId generation back to InlayCache 2023-06-29 22:25:49 +03:00
Kirill Bulatov e82b4d8957 Properly handle hint addition queries 2023-06-29 22:25:49 +03:00
Kirill Bulatov 5322aa09b9 Properly handle settings toggle 2023-06-29 22:25:49 +03:00
Kirill Bulatov 8f68688a64 Allow readding inlays with existing ids, move inlay types 2023-06-29 22:25:49 +03:00
Kirill Bulatov 49c00fd571 Generate InlayIds in InlayMap, prepare InlayCache for refactoring 2023-06-29 22:25:49 +03:00
Kirill Bulatov e217a95fcc Cleanup the warnings 2023-06-29 22:25:49 +03:00
Kirill Bulatov 76d35b7122 Use proper, limited excerpt ranges and manage inlay cache properly 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 10765d69f4 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 8cdf1a0faf Switch over to inlay map for Copilot suggestions
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov b231fa47af Apply hints setings on startup 2023-06-29 22:25:49 +03:00
Kirill Bulatov c898298c5c Properly update inlay hints when settings are changed 2023-06-29 22:25:49 +03:00
Kirill Bulatov 1ed52276e0 Add inlay hint settings 2023-06-29 22:25:49 +03:00
Kirill Bulatov ea837a183b Store inlays per paths and query on editor open 2023-06-29 22:25:49 +03:00
Kirill Bulatov f155f5ded7 Better rpc inlay hint handling 2023-06-29 22:25:49 +03:00
Kirill Bulatov b3aa75a363 Refresh inlays on buffer reopens 2023-06-29 22:25:49 +03:00
Kirill Bulatov e1f22c3684 Cache anchors from all versions, remove out of range hints 2023-06-29 22:25:49 +03:00
Kirill Bulatov 7abaf22b93 Generate proper inlay diffs for splice 2023-06-29 22:25:49 +03:00
Kirill Bulatov 6d1068d1e9 Query inlay hints for excerpt ranges only 2023-06-29 22:25:49 +03:00
Kirill Bulatov 271cd25a1d Display excerpt-ranged hints only 2023-06-29 22:25:49 +03:00
Kirill Bulatov c7fa8dbc70 React with inlay updates on excerpt events 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 9ce9b73879 Generate edits for inlay hints
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov daa2ebb57f Calculate anchors for new hints 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 5fadbf77d4 Implement InlayHint sync method and fix the bugs
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov 3028767d12 Improve on inlya locations 2023-06-29 22:25:48 +03:00
Kirill Bulatov 7397b8028c Simplify inlay hint version handling 2023-06-29 22:25:48 +03:00
Kirill Bulatov 78b3c9b88a Store hints in the new map only 2023-06-29 22:25:48 +03:00