plugins/cmp: remove helpers

This commit is contained in:
Austin Horstman 2024-10-06 10:05:31 -05:00
parent 62b87e5b56
commit 08cac4a5c0
No known key found for this signature in database
12 changed files with 113 additions and 112 deletions

View file

@ -1,12 +1,13 @@
{
lib,
helpers,
...
}:
let
cmpOptions = import ./options { inherit lib helpers; };
inherit (lib.nixvim) toLuaObject;
cmpOptions = import ./options { inherit lib; };
in
helpers.neovim-plugin.mkNeovimPlugin {
lib.nixvim.neovim-plugin.mkNeovimPlugin {
name = "cmp";
originalName = "nvim-cmp";
package = "nvim-cmp";
@ -72,17 +73,17 @@ helpers.neovim-plugin.mkNeovimPlugin {
plugins.cmp.luaConfig.content =
''
local cmp = require('cmp')
cmp.setup(${helpers.toLuaObject cfg.settings})
cmp.setup(${toLuaObject cfg.settings})
''
+ (lib.concatStringsSep "\n" (
lib.mapAttrsToList (
filetype: settings: "cmp.setup.filetype('${filetype}', ${helpers.toLuaObject settings})\n"
filetype: settings: "cmp.setup.filetype('${filetype}', ${toLuaObject settings})\n"
) cfg.filetype
))
+ (lib.concatStringsSep "\n" (
lib.mapAttrsToList (
cmdtype: settings: "cmp.setup.cmdline('${cmdtype}', ${helpers.toLuaObject settings})\n"
cmdtype: settings: "cmp.setup.cmdline('${cmdtype}', ${toLuaObject settings})\n"
) cfg.cmdline
));
};