mirror of
https://github.com/deepseek-ai/awesome-deepseek-integration.git
synced 2025-02-22 21:59:02 -05:00
Merge pull request #83 from wenjinnn/main
doc: add `olimorris/codecompanion.nvim`
This commit is contained in:
commit
ef16d94fa0
@ -174,6 +174,11 @@ English/[简体中文](https://github.com/deepseek-ai/awesome-deepseek-integrati
|
|||||||
<td> <a href="docs/llm.nvim/README.md"> llm.nvim </a> </td>
|
<td> <a href="docs/llm.nvim/README.md"> llm.nvim </a> </td>
|
||||||
<td> A free large language model(LLM) plugin that allows you to interact with LLM in Neovim. Supports any LLM, such as Deepseek, GPT, GLM, Kimi or local LLMs (such as ollama). </td>
|
<td> A free large language model(LLM) plugin that allows you to interact with LLM in Neovim. Supports any LLM, such as Deepseek, GPT, GLM, Kimi or local LLMs (such as ollama). </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> <img src="https://github.com/user-attachments/assets/d66dfc62-8e69-4b00-8549-d0158e48e2e0" alt="Icon" width="64" height="auto" /> </td>
|
||||||
|
<td> <a href="docs/codecompanion.nvim/README.md"> codecompanion.nvim </a> </td>
|
||||||
|
<td> AI-powered coding, seamlessly in Neovim. </td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
### JetBrains Extensions
|
### JetBrains Extensions
|
||||||
|
@ -157,6 +157,11 @@
|
|||||||
<td> <a href="docs/llm.nvim/README.md"> llm.nvim </a> </td>
|
<td> <a href="docs/llm.nvim/README.md"> llm.nvim </a> </td>
|
||||||
<td> 免费的大语言模型插件,让你在Neovim中与大模型交互,支持任意一款大模型,比如Deepseek,GPT,GLM,kimi或者本地运行的大模型(比如ollama) </td>
|
<td> 免费的大语言模型插件,让你在Neovim中与大模型交互,支持任意一款大模型,比如Deepseek,GPT,GLM,kimi或者本地运行的大模型(比如ollama) </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> <img src="https://github.com/user-attachments/assets/d66dfc62-8e69-4b00-8549-d0158e48e2e0" alt="Icon" width="64" height="auto" /> </td>
|
||||||
|
<td> <a href="docs/codecompanion.nvim/README.md"> codecompanion.nvim </a> </td>
|
||||||
|
<td> AI 驱动的编码,在 Neovim 中无缝集成. </td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
### JetBrains 插件
|
### JetBrains 插件
|
||||||
|
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
|
98
docs/codecompanion.nvim/README_cn.md
Normal file
98
docs/codecompanion.nvim/README_cn.md
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
# [codecompanion.nvim](https://github.com/olimorris/codecompanion.nvim)
|
||||||
|
|
||||||
|
> AI 驱动的编码,在 Neovim 中无缝集成
|
||||||
|
|
||||||
|
**codecompanion.nvim** 是一个提高生产力的工具,它简化了在 Neovim 中使用大型语言模型(LLM)进行开发的方式。
|
||||||
|
|
||||||
|
## 特性
|
||||||
|
|
||||||
|
- :speech_balloon: 在 Neovim 中,[Copilot Chat](https://github.com/features/copilot) 与 [Zed AI](https://zed.dev/blog/zed-ai) 的结合
|
||||||
|
- :electric_plug: 支持 Anthropic、Copilot、Gemini、Ollama、OpenAI、Azure OpenAI、HuggingFace 和 xAI LLM(或自定义 LLM!)
|
||||||
|
- :rocket: 内联变换、代码生成与重构
|
||||||
|
- :robot: 通过变量、斜杠命令、代理/工具和工作流改善 LLM 输出
|
||||||
|
- :sparkles: 内置常用任务的提示词,例如 LSP 错误的建议和代码解释
|
||||||
|
- :building_construction: 创建自定义提示、变量和斜杠命令
|
||||||
|
- :books: 同时打开多个对话
|
||||||
|
- :muscle: 异步执行,提供快速的性能
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
|
首先,导航到 Neovim 配置文件夹(默认情况下,Linux 上的路径是 `~/.config/nvim`)。
|
||||||
|
|
||||||
|
### 通过 `lazy.nvim` 安装
|
||||||
|
|
||||||
|
然后进入 `lua/plugins` 文件夹。创建一个名为 `init.lua` 的文件,并添加以下内容:
|
||||||
|
|
||||||
|
```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
|
||||||
|
}
|
||||||
|
```
|
||||||
|
重新启动 Neovim,`lazy.nvim` 应该会自动下载并安装 `codecompanion.nvim` 插件及其依赖项。
|
||||||
|
|
||||||
|
### 通过 `mini.deps` 安装
|
||||||
|
|
||||||
|
将以下内容添加到你的 `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)
|
||||||
|
```
|
||||||
|
|
||||||
|
重新启动 Neovim,`mini.deps` 应该会自动下载并安装 `codecompanion.nvim` 插件。
|
||||||
|
|
||||||
|
|
||||||
|
### 其他安装方法
|
||||||
|
https://codecompanion.olimorris.dev/installation.html
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
https://codecompanion.olimorris.dev/usage/introduction.html
|
Loading…
Reference in New Issue
Block a user