From 9bcba520c8148eb65b5de6042828d389a283eccc Mon Sep 17 00:00:00 2001 From: refaelsh Date: Sun, 22 Sep 2024 07:12:09 +0300 Subject: [PATCH] plugins/otter: remove cmp source registration Co-authored-by: Matt Sturgeon --- plugins/by-name/otter/default.nix | 10 +++++++++- plugins/cmp/auto-enable.nix | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/by-name/otter/default.nix b/plugins/by-name/otter/default.nix index f6bcfcb0..a336e50f 100644 --- a/plugins/by-name/otter/default.nix +++ b/plugins/by-name/otter/default.nix @@ -19,9 +19,17 @@ helpers.neovim-plugin.mkNeovimPlugin { "otter" "addCmpSources" ] - "Otter is now supported by `plugins.cmp.autoEnableSources`, adding `otter` to `cmp` sources will enable this plugin." + '' + You should use the "cmp-nvim-lsp" source instead. + To quote upstream's README: + > If you previously used the otter nvim-cmp source, you can remove it, as the completion results now come directly via the cmp-nvim-lsp source together with other language servers. + '' ) + # Register nvim-cmp association + # TODO: Otter is no longer a cmp-source + # Deprecated 2024-09-22; remove after 24.11 + # Note: a warning is implemented in plugins/cmp/auto-enable.nix { cmpSourcePlugins.otter = "otter"; } ]; diff --git a/plugins/cmp/auto-enable.nix b/plugins/cmp/auto-enable.nix index b4365c36..ad8b4fbf 100644 --- a/plugins/cmp/auto-enable.nix +++ b/plugins/cmp/auto-enable.nix @@ -69,6 +69,11 @@ in If you want to keep using raw lua for defining your sources: - Ensure you enable the relevant plugins manually in your configuration; - Dismiss this warning by explicitly setting `autoEnableSources` to `false`; + '' + # TODO: Added 2024-09-22; remove after 24.11 + ++ optional (elem "otter" enabledSources) '' + Nixvim (plugins.cmp): "otter" is listed in `settings.sources`, however it is no longer a cmp source. + Instead, you should enable `plugins.otter` and use the "cmp-nvim-lsp" completion source. ''; # If the user has enabled the `foo` and `bar` sources, then `plugins` will look like: