Commit Graph
2454 Commits
Author SHA1 Message Date
Conrad Irwin 43d682f6b8 Handle pixel-down to last line when no trailing newline 2023-10-20 12:46:14 -06:00
Conrad Irwin 1c36134cf9 Fix single column vim selections 2023-10-20 11:17:19 -06:00
Conrad Irwin b596b4153f Fix test 2023-10-20 10:34:09 -06:00
Kirill Bulatov 40104c06e2 Sort hint request ranges before asserting to avoid flackiness 2023-10-19 11:05:47 +03:00
Conrad Irwin 9d07561d99 Merge branch 'main' into pixel-columns 2023-10-18 23:00:56 -06:00
Conrad Irwin 3eb8aa8085 Refactor TextLayoutDetails construction 2023-10-18 22:56:11 -06:00
Conrad Irwin cb76b2a6ad Make vim visual block work better 2023-10-18 22:23:06 -06:00
Max BrunsfeldandPiotr 655c9ece2d Fix possibility of infinite loop in selections_with_autoclose_regions
Previously, that method could loop forever if the editor's autoclose
regions had unexpected selection ids.

Co-authored-by: Piotr <piotr@zed.dev>
2023-10-18 11:16:14 -07:00
Piotr Osiewicz cc335db9e0 editor/language: hoist out non-generic parts of edit functions. (#3130)
This reduces LLVM IR size of editor (that's one of the heaviest crates
to build) by almost 5%.

LLVM IR size of `editor` before this PR: 3280386
LLVM IR size with `editor::edit` changed: 3227092
LLVM IR size with `editor::edit` and `language::edit` changed: 3146807

Release Notes:
- N/A
2023-10-16 13:17:44 +02:00
Piotr Osiewicz 6f4008ebab copilot: Propagate action if suggest_next is not possible. (#3129)
One of our users ran into an issue where typing "true quote" characters
(option-[ for „ and option-] for ‚) was not possible; I've narrowed it
down to a collision with Copilot's NextSuggestion and PreviousSuggestion
action default keybinds. I explicitly did not want to alter the key
bindings, so I've went with a more neutral fix - one that propagates the
keystroke if there's no Copilot action to be taken (user is not using
Copilot etc). Note however that typing true quotes while using a Copilot
is still not possible, as for that we'd have to change a keybind.

Fixes zed-industries/community#2072


Release Notes:
- Fixed Copilot's "Suggest next" and "Suggest previous" actions
colliding with true quotes key bindings (`option-[` and `option-]`). The
keystrokes are now propagated if there's no Copilot action to be taken
at cursor's position.
2023-10-15 17:27:36 +02:00
Julia 2323fd17b0 Autocomplete docs (#3126)
Release Notes:

- Added documentation display for autocomplete items.
- Fixed autocomplete filtering blocking the Zed UI, causing hitches and
input delays with large completion lists.
- Fixed hover popup link not firing if the mouse moved a slight amount
while clicking.
- Added support for absolute path file links in hover popup and
autocomplete docs.
2023-10-13 13:26:45 -04:00
Julia ec4391b88e Add setting to disable completion docs 2023-10-12 22:08:47 -04:00
Julia 1c3ecc4ad2 Whooooops 2023-10-12 21:00:31 -04:00
Julia c4fc9f7ed8 Eagerly attempt to resolve missing completion documentation 2023-10-12 19:28:17 -04:00
Julia d23bb3b05d Unbork markdown parse test by making links match 2023-10-12 16:18:54 -04:00
Julia 85332eacbd Race completion filter w/completion request & make not block UI 2023-10-12 13:23:26 -04:00
Julia 4688a94a54 Allow file links in markdown & filter links a bit aggressively 2023-10-12 12:11:27 -04:00
Kirill Bulatov 1bfde4bfa2 Add more tests 2023-10-12 15:14:51 +03:00
Kirill Bulatov 7f4ebf50d3 Make the first prettier test pass 2023-10-12 13:30:49 +03:00
Julia a09ee3a41b Fire markdown link on mouse down
Previously any amount of mouse movement would disqualify the mouse down
and up from being a click, being a drag instead, which is a long
standing UX issue. We can get away with just firing on mouse down here
for now
2023-10-11 14:39:34 -04:00
Julia 0cec0c1c1d Fixup layout 2023-10-11 13:41:58 -04:00
Kirill Bulatov e50f4c0ee5 Add prettier tests infrastructure 2023-10-11 19:13:28 +03:00
JuliaandAntonio Scandurra 801af95a13 Make completion documentation scroll & fix accompanying panic from tag
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-10-10 10:08:29 -04:00
JuliaandAntonio Scandurra f5af5f7334 Avoid leaving selected item index past end of matches list
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-10-10 09:27:18 -04:00
Julia 354882f2c0 Enable completion menu to resolve documentation when guest 2023-10-10 00:16:15 -04:00
Conrad Irwin ab050d1890 Use Horizontal ranges everywhere 2023-10-09 21:48:50 -06:00
Conrad Irwin 002e2cc42c Round better for up/down 2023-10-09 21:48:32 -06:00
Conrad Irwin ef7e2c5d86 Get the project running! 2023-10-09 21:48:31 -06:00
Conrad Irwin e7badb38e9 Refactor to pass a TextLayoutDetails around 2023-10-09 21:47:58 -06:00
Conrad IrwinandJulia dacc8cb5f4 Begin to use pixels for column selection
For zed-industries/community#759
For zed-industries/community#1966

Co-Authored-By: Julia <floc@unpromptedtirade.com>
2023-10-09 21:47:58 -06:00
Julia 7020050b06 Fix hover_popover.rs after bad rebase 2023-10-09 14:28:53 -04:00
Julia 9d8cff1275 If documentation included in original completion then parse up front 2023-10-06 13:26:39 -04:00
Julia 32a29cd4d3 Unbork info popover parsing/rendering and make better 2023-10-06 13:26:39 -04:00
Julia 8dca4c3f9a Don't need editor style to parse markdown 2023-10-06 13:26:39 -04:00
Julia a881b1f5fb Wait for language to load when parsing markdown 2023-10-06 13:26:39 -04:00
Julia ea6f366d23 If documentation exists and hasn't been parsed, do so at render and keep 2023-10-06 13:26:38 -04:00
Julia b8876f2b17 Preparse documentation markdown when resolving completion 2023-10-06 13:26:38 -04:00
Julia fe62423344 Asynchronously request completion documentation if not present 2023-10-06 13:26:38 -04:00
Julia 77ba25328c Most of getting completion documentation resolved & cached MD parsing 2023-10-06 13:26:38 -04:00
Julia ca88717f0c Make completion docs scrollable 2023-10-06 13:26:38 -04:00
Julia e8be14e5d6 Merge info popover's and autocomplete docs' markdown rendering 2023-10-06 13:26:38 -04:00
Julia 370a3cafd0 Add markdown rendering to alongside completion docs 2023-10-06 13:26:38 -04:00
Julia 1584dae9c2 Actually display the correct completion's doc 2023-10-06 13:26:38 -04:00
Julia e802c072f7 Start hacking in autocomplete docs 2023-10-06 13:26:38 -04:00
Conrad Irwin 2d99b327fc Don't wrap on paragraphs
For zed-industries/community#2116
2023-10-06 10:32:15 -06:00
Mikayla Maki 37de4a9990 Add markdown parsing to channel chat (#3088)
TODO:
- [x] Add markdown rendering to channel chat
- [x] Unify (?) rendering logic between hover popover and chat
- [x] ~~Determine how to deal with document-oriented markdown like `#`~~
Unimportant until we want to do something special with `#channel`
- [x] Tidy up spacing and styles in chat panel

Release Notes:

- Added markdown rendering to channel chat
- Improved channel chat message style
- Fixed a bug where long chat messages would not soft wrap
2023-10-05 14:30:12 -07:00
Mikayla c4870e1b6b re-unify markdown parsing between hover_popover and chat 2023-10-05 14:22:41 -07:00
Conrad Irwin f1c743286d Clear SelectionGoal on input 2023-10-05 09:02:52 -06:00
Julia 3d68fcad0b Detach completion confirmation task when selecting with mouse
Otherwise the spawn to resolve the additional edits never runs causing
autocomplete to never add imports automatically when clicking with the
mouse
2023-10-02 13:18:49 -04:00
Max Brunsfeld a8b35eb8f5 Merge branch 'main' into allow-following-outside-of-projects 2023-09-28 11:58:28 -07:00