mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 18:41:56 +03:00
c81230405f
This allows function call (i.e. snippet) completion with `typescript-language-server`. So far that didn't work, because `typescript-language-server` doesn't respond with `insertText` when getting the completions, but only when then sending `completionItem/resolve` requests. See: https://github.com/hrsh7th/nvim-cmp/issues/646#issuecomment-992765479 What this PR does is to support text edits in the response to `completionItem/resolve`, which means updating the completion item. It then enables this feature by default for `typescript-language-server`. TODOs: - [x] Make this work over collab - [x] Test that this doesn't break existing language server support - [x] Refactor duplicated code Release Notes: - Added support for function call completion when using `typescript-language-server`. This will result in parameters being added, which can then be changed and navigated with `<tab>`. For this to work with `typescript-language-server`, the documentation for a given completion item needs to be resolved, meaning that if one types very quickly and accepts completion before `typescript-language-server` could respond with the documentation, no full function completion is used. Demo: https://github.com/zed-industries/zed/assets/1185253/c23ebe12-5902-4b50-888c-d9b8cd32965d |
||
---|---|---|
.. | ||
display_map | ||
git | ||
scroll | ||
test | ||
actions.rs | ||
blame_entry_tooltip.rs | ||
blink_manager.rs | ||
debounced_delay.rs | ||
display_map.rs | ||
editor_settings.rs | ||
editor_tests.rs | ||
editor.rs | ||
element.rs | ||
git.rs | ||
highlight_matching_bracket.rs | ||
hover_links.rs | ||
hover_popover.rs | ||
hunk_diff.rs | ||
inlay_hint_cache.rs | ||
inline_completion_provider.rs | ||
items.rs | ||
mouse_context_menu.rs | ||
movement.rs | ||
persistence.rs | ||
rust_analyzer_ext.rs | ||
scroll.rs | ||
selections_collection.rs | ||
test.rs |