Add open declarations to generated signatures

We capture all open declarations at cursor positions and give to the generated signature. There will be some redundancies, but I think it is easier and less error-prone than constructing exact open declarations by ourselves.