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

Quarto VS Code extension inadvertently disables GitHub Copilot autocomplete for all other languages #621

Open
hangler opened this issue Dec 11, 2024 · 7 comments

Comments

@hangler
Copy link

hangler commented Dec 11, 2024

Quarto is wonderful. However, the VS Code extension sets the following configuration rule by default:

        "github.copilot.enable": {
		"quarto": false
	}

When github.copilot.enable has a value set for any particular language, though, it implicitly disables Copilot for all non-listed languages. This is unexpected and difficult to debug.

The solution is to add a wildcard setting:

        "github.copilot.enable": {
		"quarto": false
                "*": true
	}

However, I'm not sure how to have this interact smoothly with any settings a user might already have for this configuration rule. (In my case, nothing was set before installing Quarto.)

@cscheid
Copy link
Contributor

cscheid commented Dec 11, 2024

Sorry, I just want to make sure I understand. You're claiming that this setting disabled copilot for you in all languages? I have the extension installed and can't repro (I use copilot on a daily basis):

Screen.Recording.2024-12-11.at.12.57.03.PM.mov

@hangler
Copy link
Author

hangler commented Dec 11, 2024

Yes, in my case it did. Here's an example with a Remix project I just created:

CleanShot.2024-12-11.at.12.21.46.mp4

Details on my VS Code:

Version: 1.95.3 (Universal)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

Happy to provide further details on my setup as required!

@cscheid
Copy link
Contributor

cscheid commented Dec 11, 2024

That appears to be exactly what I'm running:

Version: 1.95.3 (Universal)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z (4 wks ago)
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 22.6.0

@hangler
Copy link
Author

hangler commented Dec 12, 2024

Did you possibly have other values set on the github.copilot.enable object in your settings before adding the "quarto": false line at all..?

Edited to add:

It looks like other people might have faced a similar issue: https://stackoverflow.com/a/78777839

@cscheid
Copy link
Contributor

cscheid commented Dec 12, 2024

Thanks for following up. It turns out that yes, I do have something very much like this on my VS Code user settings. I have no recollection of adding it (and I wish these files were stored in version control but, alas, they're not... :( ), but the following lines are present in my ~/Library/Application Support/Code/User/settings.json file:

  "github.copilot.enable": {
    "quarto": false,
    "*": true
  },

@cscheid cscheid removed the needinfo label Dec 12, 2024
@cscheid
Copy link
Contributor

cscheid commented Dec 12, 2024

I'll say that "When github.copilot.enable has a value set for any particular language, though, it implicitly disables Copilot for all non-listed languages" smells like a VS Code bug to me. Nevertheless, it's a sufficiently bad one that we should be willing to work around it.

Adding "*": true seems intuitive, but I'd like to know how VS Code composes github.copilot.enable settings before making this change. It might just be that we want to instead remove the github.copilot.enable entry altogether.

@hangler
Copy link
Author

hangler commented Dec 12, 2024

I'll say that "When github.copilot.enable has a value set for any particular language, though, it implicitly disables Copilot for all non-listed languages" smells like a VS Code bug to me.

I was just thinking exactly this myself, as I pondered it some more... setting a value specific to one language doesn't seem like it should require opting-in for all other languages! (I just tested, and changing the value to "quarto": true, but not adding the wildcard entry, has the same effect as "quarto": false).

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