Resolved: Why CompletionItemProvider not work when enter charactor?


I have uploaded my code at
Steps to reproduce:
  1. Open github page
  2. Enter char ‘O’ at the endline then you can get suggestion
    provide suggestions
  3. Enter char ‘O’ before the endline there are no suggestions appeared
    none suggestion


I think the problem is that VS Code filters out your candidates because it gets the wrong already typed characters. In my completion providers I use a different method:
const info = model.getWordUntilPosition(position);
which finds the word before the current caret position.

If you have better answer, please add a comment about this, thank you!