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

Enable CodeLens integration only for *.session.sql files / Command to enable on demand for other files #915

Closed
philipmat opened this issue Jul 20, 2022 · 2 comments
Labels
feature request New issue opened using "Feature request" template

Comments

@philipmat
Copy link

Is your feature request related to a problem? Please describe.
Frequently I need to change a SQL file and have no need to execute the lines within. Yet SQLTools appends "Execute" decorators for almost every single line:
image

Describe the solution you'd like
I would like to have a way to disable the CodeLens integration for most files, while keeping the rest of the functionality (highlight, completion, etc).

Ideally it should only be enable by default for *.session.sql files, and enabled on request for other sql files.

Describe alternatives you've considered
I tried associating *.session.sql files with another language and enabling "sqltools.codelensLanguages" for that language as per settings docs,
but I still see the "Execute" code lens decorators in SQL files.

    "files.associations": {
        "*.session.sql": "slim"
    },
    "sqltools.codelensLanguages": [
        "slim"
    ],

image

This was even after restarting VSCode.

Additional context

  • SQLTool v0.23.0
  • SQLTools PostgreSQL/Redshift Driver v0.2.0
  • VSCode v1.69.2 on macOS Monterey 12.4
@philipmat philipmat added the feature request New issue opened using "Feature request" template label Jul 20, 2022
@gjsjohnmurray
Copy link
Collaborator

Are you certain that the "⏯️ Execute" codelens is coming from the SQLTools extension? I've never seen it, nor can I find source code that's creating it.

@philipmat
Copy link
Author

You're absolutely right, @gjsjohnmurray - it did come from a different extension ("cweijan.vscode-redis-client").

Thank you for pointing that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template
Projects
None yet
Development

No branches or pull requests

2 participants