github / github/copilot.vim

Automatically disable copilot in dotenv files

未关闭
#135 0 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Vim Script
星标
11.7k
派生
810
PR 合并指标
30 天内没有已合并 PR

描述

It seems like a big security issue to have Copilot running by default within dotenv files (i.e. `.env`) that contain extremely sensitive information (API keys, access tokens, passwords, etc).

Can this be disabled by default?

I've circumvented this locally with this code in my vimrc:

```vimscript
augroup dotenv_detect
autocmd!
autocmd BufRead,BufNewFile *.env,*.env.* set filetype=dotenv
augroup END

let g:copilot_filetypes = {
\ '*': v:true,
\ 'dotenv': v:false
\ }
```

But this feels like a pretty general best practice that should be opt-out, not opt-in.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。