`Use type signature` action inserts invalid syntax for long signatures
type: bugcomponent: hls-refactor-plugin
<!--
Before opening a bug, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
This explains some common issues and will also help you to find the information that the issue template asks for.
-->
### Your environment
<!--
Everything in this section is optional, but it does help us to debug your issue!
-->
Which OS do you use?
fedora
Which version of GHC do you use and how did you install it?
9.10.3
How is your project built (alternative: link to the project)?
In this repo
Which LSP client (editor/plugin) do you use?
helix
Which version of HLS do you use and how did you install it?
HLS HEAD
Have you configured HLS in any way (especially: a `hie.yaml` file)?
no
### Steps to reproduce
Encountered while dev'ing locally. I create holes for signatures when refactoring and then have HLS insert the type signature for me. This seems to create invalid syntax sometimes when the signature is too long.
Note that there's two errors. One is syntax and one is printing. The type signature that's inserted isn't indented, and `Text` is a locally qualified symbol in the file and should be `T.Text`.
<img width="1096" height="293" alt="Image" src="https://github.com/user-attachments/assets/5b1ecf4b-dcee-4a07-ae4c-431fe3cf2bcf" />
### Expected behaviour
```haskell
withWorkerQueue
:: Recorder (WithPriority LogWorkerThread)
-> T.Text
-> (a -> IO ())
-> ContT () IO (TaskQueue a)
withWorkerQueue = withWorkerTasks workerTaskQueue
```
Or something akin to the above.
### Actual behaviour
<img width="895" height="164" alt="Image" src="https://github.com/user-attachments/assets/ed2fbe61-b311-45da-adc2-3d36951d7bcb" />
### Debug information
<!-- Include any useful debug information, such as relevant log snippets. -->
0 条评论