ZIm/crates/languages/src
Smit Barmase 23e8519057
Add completion_query_characters in language (#27175)
Closes #18581

Now characters for completing query and word characters, which are
responsible for selecting words by double clicking or navigating, are
different. This fixes a bunch of things:

For settings.json, this improves completions to treat the whole string
as a completion query, instead of just the last word. We now added
"space" as a completion query character without it being a word
character.

For keymap.json, this improves selecting part of an action as the ":"
character is only a completion character and not a word character. So,
completions would still trigger on ":" and query capture will treat ":"
as a word, but for actions like selections and navigation, ":" will be
treated as punctuation.

Before:
Unnecessary related suggestions as query is only the last word which is
"d".
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/8199a715-7521-49dd-948b-e6aaed04c488"
/>

Double clicking `ToggleFold` selects the whole action:
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/c7f91a6b-06d5-45b6-9d59-61a1b2deda71"
/>

After:
Now query is "one d" and it shows only matched ones.
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/1455dfbc-9906-42e8-b8aa-b3f551194ca2"
/>

Double clicking `ToggleFold` only selects part of the action, which is
more refined behavior.
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/34b1c3c2-184f-402f-9dc8-73030a8c370f"
/>

Release Notes:

- Improved autocomplete suggestions in `settings.json`, now whole string
is queried instead of just last word of string, which filters out lot of
false positives.
- Improved selection of action in `keymap.json`, where now you can
double click to only select certain part of action, instead of selecting
whole action.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-03-20 16:45:35 +05:30
..
bash Use shell script language for APKBUILD files (#27099) 2025-03-19 22:00:44 +00:00
c Improve C and C++ syntax highlighting (#25325) 2025-02-21 12:01:39 -05:00
cpp Recognize ixx as part of the cpp suffix (#26333) 2025-03-10 09:10:29 -05:00
css Add completion_query_characters in language (#27175) 2025-03-20 16:45:35 +05:30
diff Improve diff syntax highlighting queries (#21740) 2024-12-12 15:18:36 -08:00
gitcommit Fix syntax highlighting of git commit messages (#26988) 2025-03-18 18:18:56 +00:00
go Improve Go syntax highlighting (#25327) 2025-02-21 11:32:14 -05:00
gomod Add "tool" support to go.mod (#22995) 2025-01-15 17:44:28 +02:00
gowork File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
javascript Add completion_query_characters in language (#27175) 2025-03-20 16:45:35 +05:30
jsdoc Add language icons to the language selector (#21298) 2024-12-02 15:01:09 -03:00
json Add completion_query_characters in language (#27175) 2025-03-20 16:45:35 +05:30
jsonc Add completion_query_characters in language (#27175) 2025-03-20 16:45:35 +05:30
markdown Add completion_query_characters in language (#27175) 2025-03-20 16:45:35 +05:30
markdown-inline Hide Markdown-Inline language from users with a new 'hidden' flag on language configs (#17104) 2024-08-29 11:23:33 -07:00
python python: Fix and improve highlighting (#25813) 2025-03-04 08:41:10 +01:00
regex Fix regex search colors (#25962) 2025-03-03 15:55:07 -07:00
rust rust: Follow-up fixes for attribute highlighting (#26172) 2025-03-14 23:02:45 +00:00
tsx Add completion_query_characters in language (#27175) 2025-03-20 16:45:35 +05:30
typescript typescript: Add highlighting for Angular inline components (#26553) 2025-03-18 09:27:48 +00:00
yaml vim: Update anyquotes and anybrackets to behave like mini.ai plugin (#24167) 2025-02-17 14:55:48 -07:00
bash.rs Allow auto-indenting with syntax errors when using regex-based indent matches to improve bash auto-indent behavior (#24160) 2025-02-03 21:34:37 -06:00
c.rs Disable clangd's inactiveRegions support (#26539) 2025-03-12 14:20:05 +00:00
css.rs Enable CSS, JSON, Python, and Tailwind to lookup LSP installed in PATH (#22037) 2025-02-04 14:50:49 -05:00
go.rs Move "async move" a few characters to the left in cx.spawn() (#26758) 2025-03-19 02:09:02 +00:00
json.rs Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
lib.rs Move "async move" a few characters to the left in cx.spawn() (#26758) 2025-03-19 02:09:02 +00:00
python.rs Move "async move" a few characters to the left in cx.spawn() (#26758) 2025-03-19 02:09:02 +00:00
rust.rs Use textDocument/codeLens data in the actions menu when applicable #2 (#26848) 2025-03-15 20:09:32 +00:00
tailwind.rs Enable CSS, JSON, Python, and Tailwind to lookup LSP installed in PATH (#22037) 2025-02-04 14:50:49 -05:00
typescript.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00
vtsls.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00
yaml.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00