editor: Handle more completion sort cases (#30690)

Adds 3 more test cases where local variable should be preferred over
method, and local method over library methods.

Before / After:

<img height="280" alt="before-rust"
src="https://github.com/user-attachments/assets/72b34ce8-89ff-4c2b-87dc-9e63f855d31e"
/>
<img height="280" alt="after-rust"
src="https://github.com/user-attachments/assets/8e23c9ca-576c-4dc5-8946-fa37554a19e0"
/>

Before / After:

<img height="280" alt="before-react"
src="https://github.com/user-attachments/assets/f7070413-e397-441a-a0c1-16d8ce25aa12"
/>
<img height="280" alt="after-react"
src="https://github.com/user-attachments/assets/7a095954-7844-4a3e-bf59-5420b7ffdb03"
/>

Release Notes:

- N/A
This commit is contained in:
Smit Barmase 2025-05-14 18:49:39 +05:30 committed by GitHub
parent d01559f9bc
commit 78d3ce4090
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 552 additions and 166 deletions

View file

@ -47,7 +47,9 @@ extend-exclude = [
# Eval examples for prompts and criteria
"crates/eval/src/examples/",
# typos-cli doesn't understand our `vˇariable` markup
"crates/editor/src/hover_links.rs"
"crates/editor/src/hover_links.rs",
# typos-cli doesn't understand `setis` is intentional test case
"crates/editor/src/code_completion_tests.rs"
]
[default]