lsp icon indicating copy to clipboard operation
lsp copied to clipboard

Allow bare omnicomplete

Open mtth opened this issue 7 months ago • 1 comments

Hi there. First off, thank you for this great plugin - it's now my daily driver for most languages.

One feature I miss from other similar plugins is the ability to omnicomplete without a prefix character. This is useful for example in TypeScript to fill in literal objects:

someFunctionCall({
  | // With the cursor here, no completions are returned unless at least one character is added
})

I believe this is due to this check in g:LspOmniFunc:

https://github.com/yegappan/lsp/blob/9f3d92ed7f3ba0ba5b496f0fd2150ce56b049832/autoload/lsp/completion.vim#L498-L503

Would you consider a change which allows these triggers to go through? For manual invocations via <c-x><c-o>, using trigger kind 1 (Invoked) could be a natural default.

mtth avatar Apr 04 '25 04:04 mtth

I was wondering the same thing, spent half an hour figuring out how it works and ended up commenting out return -2 (it works perfectly well without that line, at least in TS). Decided to open an issue, only to realize someone else already did :)

It would be awesome if there was a configuration option to disable the check!

cutiful avatar Apr 07 '25 11:04 cutiful