Commit Graph
5172 Commits
Author SHA1 Message Date
Kirill Bulatov a050e82102 Allow selecting all search matches in buffer 2023-07-14 14:47:12 +03:00
Mikayla Maki 3026e4e6c0 Add line height settings for the editor 2023-07-13 16:14:33 -07:00
Mikayla Maki 100593fcdd WIP: Resizing splits (#2715)
We're finally doing the thing. 


TODO:
- [x] Choose an approach 
- Decided to add a new element just for the pane axis, containing a
slimmed down copy of the flex code.
- [x] Wire through callbacks and pointers so that data goes where it
needs to
- [x] Do the flex juggling math on resize
- [x] Update the flexes when updating the split tree
- [x] Restore the active_pane_magnification setting
- [x] Serialize an axis' flexes

Release Notes:
- Made the center pane group splits resizable. Note that resizing is
disabled if the `active_pane_magnification` setting is changed from
default.
2023-07-13 15:29:34 -07:00
Mikayla Maki 905a31254f Styled and refined behavior for split resizing 2023-07-13 11:28:21 -07:00
Kirill BulatovandMax Brunsfeld a05c1daacd Force resolve all completions, to ensure their edits are up-to-date
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-12 21:10:01 +03:00
Kirill Bulatov 65b409547a Do not resolve completions if extra edits are available 2023-07-12 20:28:16 +03:00
Kirill Bulatov 1181f12b44 Draft the postfix completions support 2023-07-12 18:32:03 +03:00
Joseph T. LyonsandMax Brunsfeld b3f5408ed4 Add call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-07-11 13:58:55 -04:00
Kirill Bulatov 752a0fa143 Add a test 2023-07-11 17:10:34 +03:00
Piotr Osiewicz 362d9e87cf Piotr/z 2590 search result marks jump around in scrollbar as cursor (#2700)
This closes ticket Z-2590 reported by @JosephTLyons . Thanks Joseph =)
Release Notes:

- N/A
2023-07-11 09:40:00 +02:00
Piotr Osiewicz b1414eb285 Rename background_highlights_in_range_for_key to background_highlights_in_range_for 2023-07-11 09:31:08 +02:00
Piotr Osiewicz 27e4c4f9a7 Highlight only search results 2023-07-11 09:28:34 +02:00
Piotr Osiewicz 659dda1703 editor: Keep scrollbar up if there are selections
Z-2556
2023-07-10 17:44:27 +02:00
Conrad Irwin 385cc12725 Rebuild vim search experience on refactored code 2023-07-07 15:57:54 -06:00
Conrad Irwin 6e6b7b87ca vim: Don't enter visual mode in search/go to definition
Fixes: zed-industries/community#1514
Contributes: zed-industries/community#1284
2023-07-07 15:56:37 -06:00
Conrad Irwin eff7089db8 vim: { } to navigate by paragraph (#2668)
As part of this I added `assert_shared_state()` to the
NeovimBackedTestContext so that it is more like a drop-in replacement
for the VimTestContext.

The remaining part of zed-industries/community#682 is adding bracket
matching to plain text. It looks like the current logic requires there
to be a tree sitter language for the language in order to support
bracket matching. I didn't fix this in this PR because I was unsure
whether to try and work around that, or to try and add a plain text tree
sitter language.

Release Notes:

- vim: support `{` and `}` for paragraph motion
([#470](https://github.com/zed-industries/community/issues/470)).
- vim: fix `%` at the end of the line
([#682](https://github.com/zed-industries/community/issues/682)).
2023-07-07 14:59:06 -06:00
Kirill Bulatov 4e5a620d1c Remove redundant hint kind checks in tests 2023-07-06 23:27:25 +03:00
Piotr Osiewicz 203a1c0a0e Z 1332/show search results in scrollbar (#2687)
This PR adds highlighting of search results to the scrollbar.

Release Notes:

- Added highlighting of search results to the scrollbar.
2023-07-06 19:28:21 +02:00
Kirill Bulatov 9f000ab185 Add a test 2023-07-06 17:16:34 +03:00
Antonio Scandurra 89e1eb4edd Clip left when finding preceding (line) boundary
This fixes an issue that was causing `alt-left` to not move the cursor
when it was located right after an inlay hint with a `Left` bias.
2023-07-06 16:25:27 +03:00
Piotr Osiewicz 9260f5d093 Save a flushing line instead of discarding it 2023-07-06 13:52:03 +02:00
Piotr Osiewicz 6022da58f3 Add hunk merging 2023-07-06 13:31:45 +02:00
Piotr Osiewicz 850e35f5cb fixup! Do not render multiple hunks for the same line 2023-07-06 12:11:08 +02:00
Kirill Bulatov 0ad7efb1b2 Show inlay hints on startup for every language server with work events
Language servers such as typescript-language-servers report a single
work event, ending right after server's startup.

Other servers might send more similar event, also during startup.
The rest of the events are diagnostic-related and we filter them out.

React on such events with /refresh-like hint update, that will check
only the visible part of the editor for hints and might be replaced by
other /refresh requests, if needed.
2023-07-06 13:10:59 +03:00
Piotr Osiewicz f3899e3246 Do not render multiple hunks for the same line 2023-07-06 12:09:33 +02:00
Piotr Osiewicz a5afd99a66 Merge branch 'main' into Z-1292/show_search_results_in_scrollbar 2023-07-06 11:43:44 +02:00
Kirill Bulatov aba730bb6d Remove InlayProperties 2023-07-05 16:17:14 +03:00
Kirill Bulatov c173345c86 Simplify inlay map data 2023-07-05 15:23:56 +03:00
Kirill BulatovandJulia Risley 8f34330c6d Do not perform OnTypeFormating after pair brace insert
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-07-03 17:21:44 +03:00
Kirill Bulatov a66f2a8be9 Do not add extra spaces to hints 2023-07-03 11:17:12 +03:00
Kirill Bulatov 1a5f3c1991 Remove excessive hint update queries
* Filter out queries for outdated buffers just before hint tasks spawn:
  multicared edits might empit standalone events simultaneously
* Only spawn inlay update tasks for visible buffers with corresponding
  language
* Do not spawn tasks for local projects' buffers without LSP servers
2023-06-30 22:03:21 +03:00
Conrad Irwin e5b58d8682 vim: Fix edge-case in } when trailing newline is absent
Added .assert_shared_state() to NeovimBackedTestContext – although it's
not strictly necessary to show the expected behaviour in the test file
(as we can just compare to neovim's JSON recording), it makes it much
easier to understand what we're testing.
2023-06-29 23:31:22 -06:00
Conrad Irwin dd53b256cb vim: Add }/{ for start/end of paragraph
Fixes: zed-industries/community#470
2023-06-29 23:31:22 -06:00
Kirill Bulatov b56e2b4a28 Remove a flacky test, fix the failing one 2023-06-29 22:45:04 +03:00
Kirill Bulatov 3a66693941 Post-rebase fixes 2023-06-29 22:39:33 +03:00
Kirill Bulatov 4afeb64e4c Invalidate refresh tasks better 2023-06-29 22:39:18 +03:00
Kirill Bulatov 5f79eea757 Simplify the hint cache code 2023-06-29 22:39:18 +03:00
Kirill Bulatov 54a4c0d0e3 Better tests, invalidate multibuffer excerpts better 2023-06-29 22:39:18 +03:00
Kirill Bulatov 95cc88678e Simplify hint task queueing 2023-06-29 22:39:18 +03:00
Kirill Bulatov 7ae67fc0b1 More inlay hint cache tests 2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 379325c8c4 Use fold points to go to display map's prev/next line boundary
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 9bdbf83f2e Fix wrap map test
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 4b5e5c8206 Fix fold map tests
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill Bulatov a92bc13f72 Add more hint tests 2023-06-29 22:39:18 +03:00
Kirill Bulatov aefc4e1748 Move highlights from fold to inlay randomized tests 2023-06-29 22:39:18 +03:00
Kirill Bulatov ff5645c43b Move hint settings on the language level 2023-06-29 22:39:18 +03:00
Kirill Bulatov 62c136a59d Theme hints and suggestions differently 2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 16ffe2d503 Improve inlay hint highlights
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill Bulatov b85bb724fa Test inlay hint cache 2023-06-29 22:39:18 +03:00
Nate Butler b39ef4ba1b Update Hint Style
zzz
2023-06-29 22:39:17 +03:00