copilot: load on LazyFile

This commit is contained in:
Ching Pei Yang 2025-03-22 15:02:40 +01:00 committed by NotAShelf
parent e8dd47bbd0
commit e771f299c1
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF

View file

@ -37,6 +37,12 @@ in {
inherit (cfg) setupOpts;
after = mkIf cfg.cmp.enable "require('copilot_cmp').setup()";
event = [
{
event = "User";
pattern = "LazyFile";
}
];
cmd = ["Copilot" "CopilotAuth" "CopilotDetach" "CopilotPanel" "CopilotStop"];
keys = [
(mkLuaKeymap ["n"] cfg.mappings.panel.accept (wrapPanelBinding ''require("copilot.panel").accept'' cfg.mappings.panel.accept) "[copilot] Accept suggestion" {})