mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-24 09:51:00 +01:00
opencode: add module
Seamlessly integrate the opencode AI assistant with Neovim — convenient and editor-aware research, reviews, and requests.
This commit is contained in:
parent
f68f9d145a
commit
e0f1e4ae4b
2 changed files with 131 additions and 0 deletions
36
plugins/by-name/opencode/default.nix
Normal file
36
plugins/by-name/opencode/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "opencode";
|
||||
packPathName = "opencode.nvim";
|
||||
package = "opencode-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.khaneliman ];
|
||||
|
||||
description = ''
|
||||
OpenCode.nvim provides seamless integration with Claude Code for AI-assisted development.
|
||||
|
||||
> [!NOTE]
|
||||
> Recommended: `snacks.enable` with `settings.input.enabled = true` for better prompt input
|
||||
> Required: `snacks.enable` to use opencode.nvim's embedded terminal
|
||||
|
||||
> [!TIP]
|
||||
> Set `opts.autoread = true` if using the `auto_reload` option.
|
||||
'';
|
||||
|
||||
callSetup = false;
|
||||
hasLuaConfig = false;
|
||||
extraConfig = cfg: {
|
||||
globals.opencode_opts = cfg.settings;
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
port = 8080;
|
||||
auto_reload = false;
|
||||
prompts = {
|
||||
example = {
|
||||
description = "An example prompt configuration";
|
||||
prompt = "Write a function that returns the factorial of a number";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue