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

Add PRQL Settings shortcut menu button to SQL Preview and PRQL Editor titlebar #90

Closed
RandomFractals opened this issue Feb 14, 2023 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@RandomFractals
Copy link
Collaborator

RandomFractals commented Feb 14, 2023

for quick toggles of PRQL target setting added in #63 and other new/future PRQL configuration settings display.

I've only played with sqlite and duckdb with prql so far, but found myself keeping vscode Settings tab open when switching between my demo dbs to generate diff. sql outputs.

We could use the standard vscode cog/config icon for quick access to those PRQL Settings.

Also, while at it, do we need to add more PRQL compiler toggles/settings?

Quick example of the Settings shortcut from our old Snippets Viewer for the general idea. Clicking on the cog icon in snippets tree view takes you directly to extension config. settings in this example:

snippets-viewer-tree-view

@RandomFractals RandomFractals added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 14, 2023
@RandomFractals
Copy link
Collaborator Author

RandomFractals commented Feb 14, 2023

One note: when the one and only PRQL Target setting changes when this shortcut menu is added, we'll refresh SQL Preview to generate SQL output for the selected SQL target system. Currently, you have to close & reopen SQL Preview to see new target system sql output.

SQL Preview refresh on PRQL Target setting change might require us to refactor that view impl. as described in #60 and add new refresh() static method to that singleton vscode webview.

@RandomFractals
Copy link
Collaborator Author

Looking at the current JS lib CompilerOptions, the only other prql setting that might be worth exposing in ext. config is signature comment that adds prql compiler signature with version and target for the generated SQL.

I can see how some users might not want to have that comment added to the generated SQL files.

CompilerOptions: https://github.com/PRQL/prql/blob/main/prql-js/src/lib.rs#L46

@RandomFractals
Copy link
Collaborator Author

See how it works in updated config section in docs: https://github.com/PRQL/prql-vscode#configuration

@max-sixty
Copy link
Member

Looking good @RandomFractals !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants