## Description
Beyond the main objective (completion snippets support for `init`
function and objects), this PR also enhances on-hover for struct
definitions to also show abilities.
When the developer starts typing `fun i` (and continue typing to get to
`fun init`) the IDE will recognize that we are trying to write a
function definition whose name starts with `i` and will offer a code
snippet expanding this to a full init function definition:
````
module 0x0::some_module {
fun init(ctx: &mut TxContext) {
}
}
````
Furthermore, if the module contains a struct definition being a
one-time-witness candidate, the IDE will be smart enough to recognize
this and offer an expanded snippet:
```
module 0x0::some_module {
struct SOME_MODULE has drop {}
fun init(witness: SOME_MODULE, ctx: &mut TxContext) {
}
}
```
Finally, this snippet will not be offered for all identifiers with a
given prefix, only those that represent function definitions. In
particular, it will not do it for local variable declaration in the
following code fragment:
```
module 0x0::some_module {
fun foo() {
let ini
}
}
```
It will also not be offered if `init` function is already defined.
A similar thing happens for objects. When the developer type the
"header" of an object struct (must have `key` ability), for example,
`public struct SomeStruct has key {`, the IDE will recognize that we are
trying to write a definition of an object and will insert a snippet
containing the `id` field:
```
public struct SomeStruct has key {
id: UID,
}
```
The limitation here is that `{` triggering snippet insertion must be on
the same line as the struct definitinion. We may address at some point
but it will complicate the implementation and does not seem that
important at the moment as placing `{` on the same line is what pretty
much all the existing code does.
## Test plan
Added test to check that abilities are shown on-hover and manually
tested snippet insertion works.