mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-17 14:31:11 +01:00
plugins/sidekick/assertion: no copilot when nes disabled
When the Sidekick plugin has Next Edit Suggestions disabled we should not enforce the dependency on Copilot. See: https://github.com/folke/sidekick.nvim?tab=readme-ov-file#can-i-use-this-without-nes-just-for-cli-tools
This commit is contained in:
parent
a3098ca665
commit
dfc71c3d48
1 changed files with 5 additions and 3 deletions
|
|
@ -17,10 +17,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
"opencode"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
extraConfig = cfg: {
|
||||
assertions = lib.nixvim.mkAssertions "plugins.sidekick" {
|
||||
assertion = config.plugins.copilot-lua.enable || config.lsp.servers.copilot.enable;
|
||||
message = "sidekick requires either copilot-lua (${options.plugins.copilot-lua.enable}) or copilot LSP (${options.lsp.servers}.copilot.enable) to be enabled";
|
||||
assertion =
|
||||
(cfg.settings.opts.nes.enabled or true)
|
||||
-> (config.plugins.copilot-lua.enable || config.lsp.servers.copilot.enable);
|
||||
message = "sidekick requires either copilot-lua (${options.plugins.copilot-lua.enable}) or copilot LSP (${options.lsp.servers}.copilot.enable) to be enabled when NES is enabled";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue