Closed phdah closed 2 months ago
Looking over this PR, https://github.com/MattiasMTS/cmp-dbee/pull/25, this might already have solved the issue, but slightly different. Will look into if this is the case.
EDIT: This is the case, and the above auto command is not needed with that solution. Will close this PR.
This is an implementation to solve https://github.com/MattiasMTS/cmp-dbee/issues/22
The issue is that the
is_available
is evaluated at startup, when the plugin is loaded. At this time,dbee
is not loaded and it is always set tofalse
.We can use the added function independently as well as inside of the constructor of the source itself. This way, we will actually try to load the source with the
setup()
function after we have opened the Dbee client.Not sure if this is the intention, but for the completion to work, one has to run the setup after
Dbee
is open. Hence, I have this auto command to trigger completion forSQL
filesSince this already checks if
dbee
is loaded, it won't effect performance of any randomsql
files being opened.Let me know what you think @MattiasMTS