New wrapDo helper and wrapping nvim-cmp in do ... end (#53)

* added wrapDo helper

* nvim-cmp: wrapped with do

Co-authored-by: Pedro Alves <pta2002@users.noreply.github.com>
This commit is contained in:
Alexander Nortung 2022-10-25 01:17:02 +02:00 committed by GitHub
parent 9658aaf990
commit 76b915937e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -394,7 +394,7 @@ in
mkIf cfg.enable {
extraPlugins = [ pkgs.vimPlugins.nvim-cmp ];
extraConfigLua = ''
extraConfigLua = helpers.wrapDo ''
local cmp = require('cmp')
cmp.setup(${helpers.toLuaObject options})
'';

View file

@ -106,6 +106,12 @@ rec {
mkRaw = r: { __raw = r; };
wrapDo = string: ''
do
${string}
end
'';
rawType = types.submodule {
options = {
__raw = mkOption {