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

Substitute variables in extraFunction #62

Conversation

colinking
Copy link
Contributor

The extraFunction option is the only option that accepts a path, but does not support variable substitution. This PR updates it to match configFile.

For context, we want to use the following VSCode config which requires extraFunction to be templatable.

"pgFormatter.configFile": "${workspaceFolder}/db/pg_format/pg_format.conf",
"pgFormatter.extraFunction": "${workspaceFolder}/db/pg_format/extra_functions.txt",

We already specify extra-function in our pg_format.conf, but that filepath is not resolved relative to the workspace root, so we need to override it with pgFormatter.extraFunction.

@bradymholt
Copy link
Owner

Looks good - thanks! I'll release this in just a few minutes.

@bradymholt bradymholt merged commit c8af406 into bradymholt:main Apr 17, 2023
@colinking colinking deleted the colin-04-17-Substitute_variables_in_extraFunction branch April 17, 2023 17:36
@bradymholt
Copy link
Owner

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

Successfully merging this pull request may close these issues.

2 participants