1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

vim: disable copilot by default or else it reads my passwords

This commit is contained in:
2025-11-01 20:38:13 +01:00
parent 5d80f6ec0f
commit d1dd41bc6b

View File

@@ -129,9 +129,7 @@ autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" Disable Copilot for files larger than 100kb
autocmd BufReadPre *
\ let f=getfsize(expand("<afile>"))
\ | if f > 100000 || f == -2
\ | let b:copilot_enabled = v:false
\ | endif
" Disable Copilot by default
let b:copilot_enabled = v:false
" keymap to toggle it enabled
nnoremap <leader>gc :let b:copilot_enabled = !b:copilot_enabled<CR>