Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • For the "enable it when needed" bit, one would need to manually type in the corresponding command to enable the co-pilot for all file types or the current buffer's file type (which you would have to query with :set ft first). This would IMHO be more cumbersome than just giving the command :Copilot enable. It would also render one's setup of Copilot-enabled file types useless. Commented Sep 1, 2024 at 7:45
  • @Kusalananda are you saying that with this config, just doing :Copilot enable doesn't enable copilot? Commented Sep 1, 2024 at 7:56
  • Also there's the buffer-local b:copilot_enabled described right below this option which should be more convenient than looking up the buffer's file type Commented Sep 1, 2024 at 7:59
  • Exactly. With your suggestion, the co-pilot would still be disabled based on the file type of the current buffer matching that * pattern, even if you do :Copilot enable (it does not reset the g:copilot_filetypes structure). Commented Sep 1, 2024 at 10:05
  • And if you do let b:copilot_enabled = v:true in the buffer in which you want to enable it? Commented Sep 1, 2024 at 10:18