Comments
2 comments
-
Hi @TrailBear
Our apology for not responding to you on this before now!
As a ticket has been logged for this, I will continue to communicate with you via that ticket.
-
Sharing some details on what may be occurring with snippets and a potential workaround,
SQL Prompt attempts to sync the snippets from SSMS/VS when launching ADS.
It is using the sql.json file for this.
If external code is introduced into the file it looks to break this process.
There also looks to be a difference in how SQL Prompt snippets & ADS snippets handle placeholders.
Prompt wraps placeholders in $$ and ADS uses the one $ at the start.
So when attempting to read the ADS snippet in the SQL Prompt format it generates the error.
I believe the workaround here is to keep SSMS/SQL Prompt snippets only in the sql.json file and create a separate snippet file for other code.
For my testing I had created a global snippet file and saved the code snippet from your website in it, then I allowed Prompt to maintain the sql.json file.
Both files resided in my ADS snippet folder
C:\Users\<user>\AppData\Roaming\azuredatastudio\User\snippets and I could use all snippets in my project.
Hope this helps for any users of ADS and SQL Prompt trying to maintain multiple sources of snippets
Add comment
Please sign in to leave a comment.
Further, while experimenting I see that if I add only comments to the ADS sql.json, that they get erased.
Redgate SQL Prompt Version 0.2.10 in ADS 1.36.2
Added just the "select top 5" sample snippet from Create reusable code snippets - Azure Data Studio | Microsoft Docs to the ADS sql.json snippets and get