Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,3 +499,7 @@

- Add [nvim-highlight-colors] plugin in `vim.ui.nvim-highlight-colors` with
`enable` and `setupOpts`

[midischwarz12](https://github.com/midischwarz12):

- Add extension support for [codecompanion-nvim].
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Add extension support is" misleading; we already hid it, it was just implicit. Better describe the change per my comment in the Nix section.

Copy link
Contributor Author

@midischwarz12 midischwarz12 Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "we already hid it"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "explicit codecompanion-nvim extension option" would be more accurate then?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had* it

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) int str enum nullOr attrs;
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
inherit (lib.generators) mkLuaInline;
in {
options.vim.assistant = {
codecompanion-nvim = {
Expand Down Expand Up @@ -295,6 +296,12 @@ in {
that can be used in the action palette.
'';
};

extensions = mkOption {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you have Fundamentally Misunderstood how setupOpts is supposed to work. Normally, the setupOpts attribute set ({}) converts to a Lua table. In the documentation section you can find how Nix primitives are converted to Lua.

In this case,adding extensions is not strictly necessary; the setupOpts table is freeform and the user can already pass

extensions = { /* nix here */}

and it would be converted to the Lua expression. With type = luaInline, howevr, the user can ONLY pass inline Lua values, which defeats the purpose of using nvf. The type should be attrsOf anything, and to justify the addition of an option I'd like you to

  1. Add an example in mkOption
  2. Better utilize description.

Otherwise there is no need for this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I'm misunderstanding. I read through the docs you sent when you sent them previously. But from what I remember, there were quite a few call backs for these plugins and made more sense to just have inline lua.

I'll poke around more and look into doing this without the explicit inline extension option.

type = luaInline;
default = mkLuaInline "{}";
description = "Extensions for codecompanion";
};
};
};
};
Expand Down