documentation for the formattingstyle schema?
DeeTron
Posts: 3 New member
I'm running SP4ADS v0.2.2.0 but it isn't clear to me what some of the settings do.
E.g.
Is there any available documentation on these settings?
Thanks for making SQLPrompt for ADS. I'm pretty much using ADS instead of SSMS 99% of the time now. Having SQLPrompt formatting is great. Especially hoping you'll continue to add all the fine-tuning features for formatting I'm still longing for from the SSMS version.
E.g.
"casing": {
"useObjectDefinitionCase": false
},
"dml": {
"clauses": {},
"listItems": {}
}
}
Is there any available documentation on these settings?
Thanks for making SQLPrompt for ADS. I'm pretty much using ADS instead of SSMS 99% of the time now. Having SQLPrompt formatting is great. Especially hoping you'll continue to add all the fine-tuning features for formatting I'm still longing for from the SSMS version.
Tagged:
Answers
When creating the style file, there should be in-built help that pops up within the file itself as you are typing:
You can trigger it by pressing Ctrl+Space in the file.
If there are any settings that you are not clear on, please don't hesitate to ask for further help.
Redgate Software
If I am in the caseExpressions object and in the value for the "thenAlignment" property and hit CTRL-Space, there is an extra suggestion that I think is a typo. I see four suggested values: indentedFromWhen, intentedFromWhen, toWhen, toWhenExpression.
I think the intentedFromWhen is a typo in the extension's codebase. Here is a screenshot.
Here is the base JSON you'll need for the recreate:
P.S. it seems that on the red-gate.com login page the username(email address) is case-sensitive. If I'm correct about that, it would be nice to mention that on the login screen here.
Redgate Software
When I create a new formattingstyle I am asked to select a master. After this I have a ready json file.
I miss a way to see and compare all predefined styles to get an idea how they are different.
When I hoover on the left part of the definition I get some help, this is fine. But there is no hint on hoovering the possible values. Maybe this is not supported by ADS. I first need to delete the content, and only then I get a list of available values. And I can do this only value per value. I miss an overview.
I think you could or better should add a description of possible content and values to the readme file of the extension.
This is very hard to use. I think I could find a style I need, but it is too complicated without any documentation of available values for all settings.
As Adrian said above, if you place your cursor in the file where you would like to replace the value and press CTRL-SPACE you will see the drop down menu with a list of the allowed values.
This can be done to find properties:
or property values:
Its also worth noting if you have SQL Prompt in SSMS 10.5.3 and SQL Prompt in ADS 0.2.5 you can create and edit your styles using the formatting styles GUI in SSMS.
Hopefully this helps,
Thanks,
Owen
SQL Prompt / SQL Search
OK, I got it. I need to place the Cursor between the ":" and the current value, then on CTRL-SPACE I get a full list. This works.
My ADS Version of SQL Prompt is 0.2.4
ADS is showing me that this is the current version. And there is no download link in the readme file or in ADS. Normally I get the download link only when I get a notification in ADS about a new version.
Maybe you could add the download link in the readme file? It is hard to find the right web link of the plugin because ADS has a restricting encapsulation to avoid users to move to the original resource site using a normal browser.
I don't use SQL Prompt in SSMS because it is not free. I used the free APEX SQL tools for many years instead of red gate non-free tools. But now Apex stopped to deliver freeware. That's why now I have a look on red gate products again.
Thanks for your suggestions, we'll likely look into improving the update / download experience of SQL Prompt in ADS in the future.
Thanks,
Owen
SQL Prompt / SQL Search
I found the link in the first topic of this forum here. I see it is a very new version. And it is easier now to see possible values using the path on the top.
Of course, it would be easier to use the formatting settings dialogs of the plugin in SSMS. I know reg-gate plugins from some projects in the past where I was allowed to use red-gate software. Many years ago I even got a T-shirt "friends of red-gate" and I got a developer license to be able to use and to promote. But it is often hard to promote tools because there is one budget and process for consulting and another process for software. Often software needs to be "listed" to be allowed. So the only chance for me to use red-gate software was when the company will buy these tools for all developers. In most other projects I need to use what they have, for example the features in SSDT.
ADS can be installed per user, without admin rights, and that's why it is easy to use in any project. And I am looking for methods to be used in projects where I don't get admin rights.
Would be fine to get free refactoring also in ADS, with SQL-Prompt. Currently, the free ways are SSDT or the old standalone APEXSql Refactor.
Could you consider publishing the complete list of all possible settings for formatting? If a user can see, what is possible, then it will be much easier to find the possible settings.
For now, I switched back to Poor Mens formatter, because it is free and is available in SSMS and in VSC. But I am not really happy with the result. It would be fine to use the same free formatter in VSC, ADS and SSMS and to be able to configure it a bit. Especially, when working in a team in an open source project, then there should be some free formatting options.
Redgate Software
Thank you! This is exactly, what I was searching for.
Could you consider adding this hint in the documentation of the extension? Then other users also would be able to easy find it.