Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aligned elements: attempting to set alias_expression #117

Open
deployment-ian opened this issue Nov 21, 2023 · 4 comments
Open

Aligned elements: attempting to set alias_expression #117

deployment-ian opened this issue Nov 21, 2023 · 4 comments

Comments

@deployment-ian
Copy link

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!

@RobertOstermann
Copy link
Contributor

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.

@deployment-ian
Copy link
Author

I have that set in my settings.json and here is my .sqlfluff config file:
image

But I still do not see the proper alignment when I format a file.

@RobertOstermann
Copy link
Contributor

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.

@deployment-ian
Copy link
Author

image

confirmed that it's picking up the config file.

Thank you for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants