Vscode Spring Boot Tools extention cant get code completions
The Spring Boot Tools extention does not work as expect,
Context
- vscode remote-wsl:

- ubuntu 18.04
- jdk: 8
as usage description:
Functionality for .properties and .yml
This extension analyzes your project's classpath and parses and indexes any Spring Boot Properties Metadata it finds. Both Maven and Gradle projects are supported.
The data in the index is used to provide validation, code completions and information hovers while editing Spring Boot Properties in either .properties or .yml format.
but when i edit my application.properties or application.yml files, i can not get any code completions.
Surprisingly, it could work well sometime. I mean ,this problem does not happen every time.
that's all ,thanks

Facing same issue
When there are no completions then it could be because of STS4 not getting the project's classpath information. If you check the language server log output it may have some messages in there that help determinining whether or not STS4 is getting classpath information for your project.
You have to enable the log output via a workspace or user setting in vscode. Just open the workspace preferences and search for a key called 'spring-boot.ls.logfile'. For example I have added something like this to my workspace settings:
"spring-boot.ls.logfile": "/tmp/bootls.log",
After you restart vscode you should then be able to open that file and see the log output there.
If you could attach the log output it may help narrow down what direction we need to look for the cause of the problem. The cause could be many things. One possibility is that there is an error in your project's pom or gradle configuration.
Surprisingly, it could work well sometime. I mean ,this problem does not happen every time
Interesting. Is that with the same project? (I.e. it sometimes works and sometimes doesn't work with the same project? Or does it work with some projects but not others?)
One possible cause of the problem is a issue with the JDT language server which is not sending classpath data. The JDT language server isn't allways computing classpaths correctly or sometimes it just takes a long time (downloading dependencies for example). It might help just to wait a little and give the JDT language server a chance to do its thing. If you waited a reasonable time, then you can try restarting vscode. The JDT language server classpath updates may work better after a restart.
If you try some of these things it would be useful if you let us know how it goes. All of that is useful information to try and determine the cause of the problem as well as useful information for others looking for a workaround.
Attached logs. The issue is with this project only and happens always. The issue may be same as https://github.com/microsoft/vscode-java-dependency/issues/189
The log file reads like you are trying auto-completion in a Java file. Can you maybe attach the sample project and provide exact steps how to reproduce and where you are trying content-assist? That would be awesome.
As for Java files, the Spring Boot language server doesn't provide a lot of additional content-assist features, so we would need to know exactly what you are trying to do here.
I am closing this one here, since no additional feedback arrived since then and the issue is already quite old. If you come across this again, please comment and we can re-open this issue. In that case, please attach a sample project that helps us to reproduce the issue. Thanks!!!