copilot.el
copilot.el copied to clipboard
`global-copilot-mode` Opens too many files
Too many files open
- I have
recompiled emacswith the relevant compile flags and increased my Arch Linuxmax number of open files - Spent many hours investigating after spending months activating copilot using
copilot-diagnoseinstead ofglobal-copilot-mode
Problem
- Read the elisp source code and learned that
global-copilot-modeenables copilot in all open buffers.
Suspicion
global-copilot-modeactually enables copilot for every file ever previously opened.
Rust
- Over the past 12 months or so I have started every project in
Rustand everytimeglobal-copilot-modeis executed emacs runs into theToo many open fileserror. - Using
global-copilot-modeappears to enable copilot in every single file I have ever used with my LSP simultaneously. Hence, not encountering this issue when I first started working and using copilot at work. I do not know how to rationalize copilot being immediately available in files that I open for the first time in a instance of work but have opened previously in the life of the project. Even other projects I open, while developing on a particular project, have copilot immediately available for them with any indication copilot was enabled for them.
Proposed solution
projectile-copilot-mode- Only enable copilot in project-specific buffers.
P.S.
If I have completely missed the mark please take away the following:
- On two different Arch development machines (work and home) emacs soft locks with 'Too many open files' error after enabling
global-copilot-mode.