mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-03 10:25:52 +00:00
feat(autopairs): custom setup opts
This commit is contained in:
parent
4db6950558
commit
6fd35972d9
2 changed files with 9 additions and 9 deletions
|
|
@ -4,9 +4,9 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.trivial) boolToString;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.autopairs;
|
||||
in {
|
||||
|
|
@ -16,12 +16,7 @@ in {
|
|||
vim.luaConfigRC.autopairs = entryAnywhere ''
|
||||
require("nvim-autopairs").setup{}
|
||||
${optionalString (config.vim.autocomplete.type == "nvim-compe") ''
|
||||
-- nvim-compe integration
|
||||
require('nvim-autopairs.completion.compe').setup({
|
||||
map_cr = ${boolToString cfg.nvim-compe.map_cr},
|
||||
map_complete = ${boolToString cfg.nvim-compe.map_complete},
|
||||
auto_select = ${boolToString cfg.nvim-compe.auto_select},
|
||||
})
|
||||
require('nvim-autopairs.completion.compe').setup(${toLuaObject cfg.setupOpts})
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue