mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-04 10:55:50 +00:00
autopairs/nvim-autopairs: lazy-load instead of always loading
This is suggested per the plugin's readme
This commit is contained in:
parent
39813f0322
commit
a7718dd214
2 changed files with 8 additions and 8 deletions
|
|
@ -142,6 +142,9 @@
|
|||
- Added [hlargs.nvim](https://github.com/m-demare/hlargs.nvim) support as
|
||||
`visuals.hlargs-nvim`.
|
||||
|
||||
- Lazy-load `nvim-autopairs` plugin when using
|
||||
`vim.autopairs.nvim-autopairs.enable`
|
||||
|
||||
[Machshev](https://github.com/machshev):
|
||||
|
||||
- Added `ruff` and `ty` LSP support for Python under `programs.python`.
|
||||
|
|
|
|||
|
|
@ -4,17 +4,14 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.autopairs.nvim-autopairs;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["nvim-autopairs"];
|
||||
pluginRC.autopairs = entryAnywhere ''
|
||||
require('nvim-autopairs').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
vim.lazy.plugins.nvim-autopairs = {
|
||||
package = "nvim-autopairs";
|
||||
setupModule = "nvim-autopairs";
|
||||
setupOpts = cfg.setupOpts;
|
||||
event = ["InsertEnter"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue