From 0e92aaf3f2f0c1b6789a408584486ff4f03abde9 Mon Sep 17 00:00:00 2001 From: Violet Wood Date: Fri, 31 Jan 2025 20:25:13 +0000 Subject: [PATCH] plugins/blink-cmp: support raw lua for settings.sources.providers.enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugins/blink-cmp: conciseness Co-authored-by: GaƩtan Lepage <33058747+GaetanLepage@users.noreply.github.com> plugins/blink-cmp: add test for providers.enabled --- plugins/by-name/blink-cmp/provider-config.nix | 2 +- tests/test-sources/plugins/by-name/blink-cmp/default.nix | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/by-name/blink-cmp/provider-config.nix b/plugins/by-name/blink-cmp/provider-config.nix index 237eb7e2..c3d54908 100644 --- a/plugins/by-name/blink-cmp/provider-config.nix +++ b/plugins/by-name/blink-cmp/provider-config.nix @@ -25,7 +25,7 @@ types.submodule { }; enabled = mkNullOrOption' { - type = types.bool; + type = with types; maybeRaw bool; description = '' Whether or not to enable the provider. ''; diff --git a/tests/test-sources/plugins/by-name/blink-cmp/default.nix b/tests/test-sources/plugins/by-name/blink-cmp/default.nix index 101fa6df..257f50fb 100644 --- a/tests/test-sources/plugins/by-name/blink-cmp/default.nix +++ b/tests/test-sources/plugins/by-name/blink-cmp/default.nix @@ -379,6 +379,13 @@ providers = { buffer.score_offset = -7; lsp.fallbacks = [ ]; + cmdline.enabled = { + __raw = '' + function() + return true + end + ''; + }; }; cmdline = [ ]; };