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

CodeWhisperer does not work when the snowflake plugin is activated #4589

Open
jsbruneau opened this issue Mar 26, 2024 · 2 comments
Open

CodeWhisperer does not work when the snowflake plugin is activated #4589

jsbruneau opened this issue Mar 26, 2024 · 2 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer needs-response Waiting on reply from issue/PR author.

Comments

@jsbruneau
Copy link

jsbruneau commented Mar 26, 2024

Problem

When the Snowflake plugin is activated, the Code Whisperer does not work.

Steps to reproduce the issue

  1. Install the AWS toolkit and enable Code Whisperer
  2. Open and save a new .sql file.
  3. Confirm that the code completion works
  4. Install the Snowflake plugins (v1.5.1) and the Snowflake for VS Code (v0.0.1)
  5. Re-Launch VS Code
  6. Try the code completion feature, it should not work

Expected behavior

The code completion should work even with other plugins activated

System details (run the AWS: About Toolkit command)

OS: Darwin arm64 23.3.0
Visual Studio Code extension host: 1.87.2
AWS Toolkit: 2.16.0
node: 18.17.1
electron: 27.3.2

@jsbruneau jsbruneau added the bug We can reproduce the issue and confirmed it is a bug. label Mar 26, 2024
@justinmk3
Copy link
Contributor

Is Snowflake a code-completion plugin? Can you link to the plugin on the vscode marketplace, so we can investigate?

@justinmk3 justinmk3 changed the title Code Whisperer does not work when the snowflake plugin is activated CodeWhisperer does not work when the snowflake plugin is activated Mar 26, 2024
@justinmk3 justinmk3 added the needs-response Waiting on reply from issue/PR author. label Mar 28, 2024
@jsbruneau
Copy link
Author

Yes, it is: https://marketplace.visualstudio.com/items?itemName=snowflake.snowflake-vsc

Because by default, the Snowflake extension will treat all .sql files as .snowflake-sql, and AWS CodeWhisperer does not process .snowflake-sql files, here’s a workaround to configure the Snowflake extension to work with .sql files, thereby enabling you to use CodeWhisperer

Modify settings.json for File Associations: Add an entry to associate *.sql files with the snowflake-sql language identifier.

Update package.json for the snowflake Extension: Adjust the enablement property of the relevant commands to accept both snowflake-sql and sql language identifiers (editorLangId == 'sql').

Modify Keybindings (keybindings.json): Set a custom keybinding for the Snowflake command to work with .sql files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. codewhisperer needs-response Waiting on reply from issue/PR author.
Projects
None yet
Development

No branches or pull requests

2 participants