mirror of
https://github.com/deepseek-ai/awesome-deepseek-integration.git
synced 2025-10-15 08:03:51 -04:00
doc: add olimorris/codecompanion.nvim
This commit is contained in:
parent
a7a66a0e76
commit
f088ffbcdf
4 changed files with 205 additions and 0 deletions
97
docs/codecompanion.nvim/README.md
Normal file
97
docs/codecompanion.nvim/README.md
Normal file
|
@ -0,0 +1,97 @@
|
|||
# [codecompanion.nvim](https://github.com/olimorris/codecompanion.nvim)
|
||||
|
||||
> AI-powered coding, seamlessly in Neovim
|
||||
|
||||
**codecompanion.nvim** is a productivity tool which streamlines how you develop with LLMs, in Neovim.
|
||||
|
||||
## Features
|
||||
|
||||
- :speech_balloon: [Copilot Chat](https://github.com/features/copilot) meets [Zed AI](https://zed.dev/blog/zed-ai), in Neovim
|
||||
- :electric_plug: Support for Anthropic, Copilot, Gemini, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI LLMs (or bring your own!)
|
||||
- :rocket: Inline transformations, code creation and refactoring
|
||||
- :robot: Variables, Slash Commands, Agents/Tools and Workflows to improve LLM output
|
||||
- :sparkles: Built in prompt library for common tasks like advice on LSP errors and code explanations
|
||||
- :building_construction: Create your own custom prompts, Variables and Slash Commands
|
||||
- :books: Have multiple chats open at the same time
|
||||
- :muscle: Async execution for fast performance
|
||||
|
||||
## Installation
|
||||
|
||||
First, Navigate to the nvim configuration folder (default on Linux is `~/.config/nvim`)
|
||||
|
||||
### Install via `lazy.nvim`
|
||||
|
||||
Then to the `lua/plugins` folder. Create a file named `init.lua` and add the following content:
|
||||
|
||||
```lua
|
||||
return {
|
||||
"olimorris/codecompanion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
config = function()
|
||||
require("codecompanion").setup({
|
||||
adapters = {
|
||||
deepseek = function()
|
||||
return require("codecompanion.adapters").extend("openai_compatible", {
|
||||
env = {
|
||||
url = "https://api.deepseek.com",
|
||||
api_key = "YOUR_API_KEY",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = "deepseek", },
|
||||
inline = { adapter = "deepseek" },
|
||||
agent = { adapter = "deepseek" },
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
```
|
||||
Restart nvim, and `lazy.nvim` should automatically download and install the codecompanion.nvim plugin and its dependencies based on the above file.
|
||||
|
||||
### Install via `mini.deps`
|
||||
|
||||
Add the following content to your `init.lua`:
|
||||
|
||||
```lua
|
||||
local add, later = MiniDeps.add, MiniDeps.later
|
||||
|
||||
later(function()
|
||||
add({
|
||||
source = "olimorris/codecompanion.nvim",
|
||||
depends = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
})
|
||||
require("codecompanion").setup({
|
||||
adapters = {
|
||||
deepseek = function()
|
||||
return require("codecompanion.adapters").extend("openai_compatible", {
|
||||
env = {
|
||||
url = "https://api.deepseek.com",
|
||||
api_key = "YOUR_API_KEY",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = "deepseek", },
|
||||
inline = { adapter = "deepseek" },
|
||||
agent = { adapter = "deepseek" },
|
||||
},
|
||||
})
|
||||
end)
|
||||
```
|
||||
Restart nvim, and `mini.deps` should also automatically download and install the codecompanion.nvim plugin.
|
||||
|
||||
|
||||
### Other Installation Methods
|
||||
https://codecompanion.olimorris.dev/installation.html
|
||||
|
||||
## Usage
|
||||
https://codecompanion.olimorris.dev/usage/introduction.html
|
Loading…
Add table
Add a link
Reference in a new issue