Alex Szücs
Alex Szücs

Reputation: 681

How to Exclude Specific Files (like .env) from GitHub Copilot (LSP-copilot) in Sublime?

I'm using GitHub Copilot with Sublime Text, integrated via lsp-copilot. I want to configure it so that Copilot does not provide suggestions for specific files, such as .env or some.txt, while still working on other files.

I’ve tried using the enabled_for_files setting but can’t seem to get it to work properly. Below is the current part of my configuration:

{
    "clients": {
        "copilot": {
            "enabled": true,
            "enabled_for_files": ["!*.env", "!some.txt"]
        }
    }
}

I have also tried .copilotignore in containing folder.

However, Copilot still seems to be active in those files.

I have ended up disabling plugin, i may create a hotkey for turn it on/off.

What’s the correct way to configure lsp-copilot in Sublime Text to exclude specific files or file patterns? Is there another setting I need to adjust or an alternative approach to accomplish this? Any help would be appreciated!

Upvotes: 0

Views: 97

Answers (1)

Tetsouho
Tetsouho

Reputation: 11

It seems that there is an exclusion beta configuration on Github organisation level.

https://docs.github.com/fr/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/excluding-content-from-github-copilot

Yet it doesn't seem to have any influence on the IDE

Upvotes: 1

Related Questions