mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-03 22:04:31 +02:00
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:
parent
9658aaf990
commit
76b915937e
2 changed files with 7 additions and 1 deletions
|
@ -394,7 +394,7 @@ in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [ pkgs.vimPlugins.nvim-cmp ];
|
extraPlugins = [ pkgs.vimPlugins.nvim-cmp ];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = helpers.wrapDo ''
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
cmp.setup(${helpers.toLuaObject options})
|
cmp.setup(${helpers.toLuaObject options})
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -106,6 +106,12 @@ rec {
|
||||||
|
|
||||||
mkRaw = r: { __raw = r; };
|
mkRaw = r: { __raw = r; };
|
||||||
|
|
||||||
|
wrapDo = string: ''
|
||||||
|
do
|
||||||
|
${string}
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
|
||||||
rawType = types.submodule {
|
rawType = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
__raw = mkOption {
|
__raw = mkOption {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue