vscode-sqlfluff
vscode-sqlfluff copied to clipboard
Aligned elements: attempting to set alias_expression
I am trying to set the values for layouts found here: https://docs.sqlfluff.com/en/stable/layout.html#aligned-elements
Specifically, I am trying to set 'align_within = select_clause'
I haven't been able to set this in the settings.json for my workspace.
Am I able to do so? Is this feature supported in the VS-code extension? Thank you so much!
You will have to set that within a sqlfluff configuration file. You can then set the config file with the "sqlfluff.config": "${workspaceFolder}/.sqlfluff" setting if it is not automatically recognized.
I have that set in my settings.json and here is my .sqlfluff config file:
But I still do not see the proper alignment when I format a file.
Assuming that this extension is picking up the config file, which you could test by setting the max line length to something small and seeing if errors show as expected, then this would be an issue for the main sqlfluff repository.
confirmed that it's picking up the config file.
Thank you for your assistance!