Skip to content

Commit

Permalink
plugins/otter: switch to nvim-cmp association
Browse files Browse the repository at this point in the history
Removes the addCmpSources option.
  • Loading branch information
MattSturgeon committed Jun 30, 2024
1 parent 17f4aa5 commit 1391a64
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions plugins/languages/otter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ helpers.neovim-plugin.mkNeovimPlugin config {

maintainers = [ lib.maintainers.perchun ];

imports = [
# TODO: introduced 2024-06-29; remove after 24.11
(lib.mkRemovedOptionModule
[
"plugins"
"otter"
"addCmpSources"
]
"Otter is now supported by `plugins.cmp.autoEnableSources`, adding `otter` to `cmp` sources will enable this plugin."
)
# Register nvim-cmp association
{ cmpSourcePlugins.otter = "otter"; }
];

settingsOptions = {
lsp = {
hover = {
Expand Down Expand Up @@ -69,18 +83,4 @@ helpers.neovim-plugin.mkNeovimPlugin config {
When true, otter handles these cases fully. This is a (minor) performance hit.
'';
};

extraOptions = {
addCmpSources = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Automatically add otter to cmp sources, as it is required for some functionality.
'';
};
};

extraConfig = cfg: {
plugins.cmp.settings.sources = lib.mkIf cfg.addCmpSources [ { name = "otter"; } ];
};
}

0 comments on commit 1391a64

Please sign in to comment.