mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-31 16:14:46 +02:00
plugins/cmp: remove helpers
This commit is contained in:
parent
62b87e5b56
commit
08cac4a5c0
12 changed files with 113 additions and 112 deletions
|
@ -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
|
||||
));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue