pygls icon indicating copy to clipboard operation
pygls copied to clipboard

Multi-character trigger

Open Et9797 opened this issue 3 years ago • 2 comments

I'm trying to have completions using multi-character trigger , for example ::. However, it does not seem to work (coc.nvim). Is there a way to accomplish this?

Et9797 avatar Oct 06 '22 18:10 Et9797

I haven't setup completion before, so I may be wrong, but it seems like multi-character triggering isn't supported in the official LSP standard?

But maybe it's possible to manually send a completionList from your language server when it detects :: from a textDocument/didChange message?

tombh avatar Oct 12 '22 20:10 tombh

I haven't setup completion before, so I may be wrong, but it seems like multi-character triggering isn't supported in the official LSP standard?

But maybe it's possible to manually send a completionList from your language server when it detects :: from a textDocument/didChange message?

I will try, thank you

Et9797 avatar Oct 17 '22 09:10 Et9797

@tombh Right after you suggested this I indeed managed to code up a solution with didChange. I had posted a stack overflow question about this around that time. I just tried using it on new OpenAi GPT and this is the response it gave: https://stackoverflow.com/questions/74154088/how-to-implement-a-multi-character-auto-complete-trigger-in-language-server image image

Incredible stuff lol

Et9797 avatar Dec 03 '22 12:12 Et9797

What????

I feel like this should be a day to remember in my life. I've of course seen the progress of AI for many years now, but this is the first time it's actually organically and constructively crossed my path.

Incredible stuff indeed 😲🤓

tombh avatar Dec 03 '22 17:12 tombh