Why is my LSP suggesting auto-imports in another buffer?

Hi,

When I use omnifunc completion, and select “Auto import” options from the completion menu, a little buffer appears above my window with the import suggested. However I can’t figure out how to get the LSP to directly add this snippet to the buffer I am editing.

I currently have to switch to this new auto-import window, yank the suggestions, close the window, and put the suggestion in the buffer of the file I was editing.

I am wondering if this is this expected behaviour? Or if there is there anything I can do to get it to add the import directly to the buffer I am editing?

I’m trying to avoid extra plugins if possible.

Many thanks for any help!

I’m not sure about the extra window, but here’s the auto-command I use to resolve imports when using omnifunc:

1 Like

That’s really neat. Thanks