# Enhancing Neovim with Copilot Chat: A New Era of Coding Efficiency

Last month, I wrote a small guide for [Copilot Chat with Neovim](https://blog.productsway.com/how-to-use-copilot-chat-with-neovim), an endeavor I didn't expect to revisit. However, the recent introduction of `CopilotChatInPlace` commands has marked a significant milestone, narrowing the functionality gap with its VSCode extension. This enhancement promises a seamless coding experience, as demonstrated in this demo:

[![In-place Demo](https://i.gyazo.com/4a5badaa109cd483c1fc23d296325cb0.gif align="left")](https://gyazo.com/4a5badaa109cd483c1fc23d296325cb0)

### **The Journey of Collaboration**

The journey commenced with a productive discussion on my fork at [CopilotChat.nvim/discussions/22](https://github.com/jellydn/CopilotChat.nvim/discussions/22). A Github user, [ziontee113](https://github.com/ziontee113) made an amazing contribution to CopilotChat.nvim. Together with [gptlang](https://github.com/gptlang/CopilotChat.nvim), we began to merge two new commands: `CopilotAgent` and `CopilotAgentVisual` into the plugin.

> My project is currently here [ziontee113/CopilotAgent.nvimI plan to make this into a](https://github.com/ziontee113/CopilotAgent.nvim) super agent that can handle complex coding tasks, hence the name of the derived repo.
> 
> `CopilotAgent` and `CopilotAgentVisual` is basically like the [original `CopilotChat`, but r](https://github.com/ziontee113/CopilotAgent.nvim)e-written with some new features.  
> `InplaceHandler` purpose is to prompt copilot and replace code in place, like `ChatGPT.nvim` using popup windows.  
> I also created new PopUp / Layout modules to handle such tasks like `nui.nvim`, but in Python.Follow up on the last article

### **Milestone Achieved:**[Version 1.0 release](https://github.com/jellydn/CopilotChat.nvim/releases/tag/v1.0.0)

The latest version introduces significant improvements:

* A simplified architecture that focuses on core logic integrated with minimal Lua for enhanced configuration and standalone features.
    
* Unified Python implementations into a single `CopilotChat` command for streamlined operation.
    
* A new UI layout for the `InPlace` command, facilitating easier management.
    
* Added functionalities like folding and token count for Copilot responses.
    

%[https://www.youtube.com/watch?v=6oOPGaKCd_Q&lc=UgwfLASHYti1F4PzViB4AaABAg.A-OkhjVP4jqA-OmX-MY1P6] 

#### The Good

The plugin's architecture remains straightforward. Most of the logic (core in Python) implementation communicates with thin Lua code for configuration and standalone features, e.g., spinner, and log.

#### The Bad

Despite the advancements, issues like [Ambiguous use of user-defined command](https://github.com/jellydn/CopilotChat.nvim/issues/43) or [Empty Command and Ambiguous Use of Command](https://github.com/jellydn/CopilotChat.nvim/issues/38) persist due to this plugin being written in Python 3 and the need to run the [:UpdateRemotePlugins](https://neovim.io/doc/user/remote_plugin.html#%3AUpdateRemotePlugins) command to register the `CopilotChat` command.

To mitigate these challenges, I created [wiki/Troubleshooting](https://github.com/jellydn/CopilotChat.nvim/wiki/Troubleshooting)

The Ugly

Windows users face unique challenges, notably the [Ambiguous use of user-defined command'](https://github.com/jellydn/CopilotChat.nvim/issues/25) or the inability to register the CopilotChat after running [`UpdateRemotePlugins`](https://neovim.io/doc/user/remote_plugin.html#%3AUpdateRemotePlugins). Please let us know if you find a way to resolve this issue. While a solution remains unknown, we encourage the community to share configurations and workarounds in [Share your config](https://github.com/jellydn/CopilotChat.nvim/discussions/55).

### **Join Us on Our Journey**

To keep abreast of developments and contribute to our evolving roadmap, we invite you to join our [Discord community](https://github.com/jellydn/CopilotChat.nvim/issues/25). Your input and collaboration are invaluable as we strive to redefine coding efficiency with Copilot Chat and Neovim.
