Support word-based completions (#26410)
Closes https://github.com/zed-industries/zed/issues/4957 https://github.com/user-attachments/assets/ff491378-376d-48ec-b552-6cc80f74200b Adds `"completions"` language settings section, to configure LSP and word completions per language. Word-based completions may be turned on never, always (returned along with the LSP ones), and as a fallback if no LSP completion items were returned. Future work: * words are matched with the same fuzzy matching code that the rest of the completions are This might worsen the completion menu's usability even more, and will require work on better completion sorting. * completion entries currently have no icons or other ways to indicate those are coming from LSP or from word search, or from something else * we may work with language scopes more intelligently, group words by them and distinguish during completions Release Notes: - Supported word-based completions --------- Co-authored-by: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
74c29f1818
commit
91c209900b
10 changed files with 632 additions and 102 deletions
|
@ -1002,10 +1002,13 @@ message Completion {
|
|||
bool resolved = 6;
|
||||
Source source = 7;
|
||||
optional bytes lsp_defaults = 8;
|
||||
optional Anchor buffer_word_start = 9;
|
||||
optional Anchor buffer_word_end = 10;
|
||||
|
||||
enum Source {
|
||||
Lsp = 0;
|
||||
Custom = 1;
|
||||
BufferWord = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue