diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-20 22:32:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-20 22:32:25 +0000 |
commit | 090e013161ab5b1679554ddd53683e81e3fe845a (patch) | |
tree | ffcf20a2b041f8fada69f7dfbc4adb1e129327f1 /crates/hir_def/src/nameres/tests/incremental.rs | |
parent | be3dc673e2f00eaa7cfbf4727cc69032ed0b6179 (diff) | |
parent | 3c000c6364ebcf94652d221ee9ffe8970540589c (diff) |
Merge #8124
8124: Add basic lifetime completion r=Veykril a=Veykril
This adds basic lifetime completion, basic in the sense that the completions for lifetimes are only shown when the user enters `'` followed by a char. Showing them when nothing is entered is kind of a pain, as we would want them to only show up where they are useful which in turn requires a lot of tree traversal and cursor position checking to verify whether the position is valid for a lifetime. This in itself doesn't seem too bad as usually when you know you want to write a lifetime putting `'` to ask for lifetime completions seems fine.
~~I'll take a look at whether its possible to lift the restriction of having to put a char after `'`.~~ This actually already works so I guess this is the clients responsibility, in which case VSCode doesn't like it.
![TYH9gIlyVo](https://user-images.githubusercontent.com/3757771/111886437-c9b02f80-89cd-11eb-9bee-340f1536b0de.gif)
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_def/src/nameres/tests/incremental.rs')
0 files changed, 0 insertions, 0 deletions