This particular sample appears to function correctly until it is saved. While using "Untitled-1" everything works as expected, but once saved as "test.py", the item does not get added to the autocomplete list. Despite running "npm install" in the directory multiple times, the issue persists. The file extensions that do not work are:
- .ts
- .c
- .cpp
- .js
- .py
- .sh
However, these extensions do work:
- No extension (unsaved)
- .txt
The problem was also reproduced on a Windows machine. To replicate the issue, follow these steps:
- Clone the Git repository
- Run "npm install" in the completions-sample folder
- Open the completions-sample folder in vscode
- Select "Start Debugging" under "Debug" to run the extension
- Create a new file without saving
- Press ctrl+shift+p and choose "Trigger Suggest". A menu should appear with items from the extension code like "Hello World!"
- Add an extension to the file by saving it, such as ".py". Repeat step 5, and notice that the menu no longer includes custom autocomplete items.
This was tested on:
- Ubuntu 18.04.2 LTS
- vscode 1.41.0