editor: Fix showing completion list with selection does not include the selection (#57405)

Fix the completion list not showing the current selection when you
execute `editor: show completions`, the stated reason by comment before
is that if you are in a tabstop snippet already it wont give you the
correct options. So my change is to just check if you are in such a
snippet and if not give the new desired behavior.

before:


https://github.com/user-attachments/assets/1b2f3594-7361-4636-9ef3-f8c9419faa26

after:


https://github.com/user-attachments/assets/1be35582-464a-40f3-b6be-ee74f9961796


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #57386

Release Notes:

- editor: include text from selection in completion list.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
e990f31ad7Finn Eitreim committed on 6/24/2026, 2:49:03 PM· committed by GitHubparent8036a3c
2 files changedLine totals unavailable