Compare commits

..

38 commits

Author SHA1 Message Date
Ching Pei Yang
2f1ce86ba4
Merge 61dc2e74d9 into e40cce5653 2024-08-23 12:26:52 +00:00
Ching Pei Yang
61dc2e74d9 flake: update lzn-auto-require 2024-08-23 14:26:44 +02:00
Ching Pei Yang
5bd9a3870d lz.n: add missing PluginSpec options 2024-08-23 14:26:44 +02:00
Ching Pei Yang
cac156bad9 add TODO 2024-08-23 14:26:44 +02:00
Ching Pei Yang
8011b8a675 lib: allow luaInline in lz.n map action 2024-08-23 14:26:44 +02:00
Ching Pei Yang
22f9ca1f6d flake: update lzn-auto-require 2024-08-23 14:26:44 +02:00
Ching Pei Yang
83432a1fb5 fixup! wrapper: use lzn-auto-require loader 2024-08-23 14:26:44 +02:00
Ching Pei Yang
5bf238006e lib: add mkSetLuaBinding 2024-08-23 14:26:44 +02:00
Ching Pei Yang
a5207983e1 wrapper: use lzn-auto-require loader 2024-08-23 14:26:44 +02:00
Ching Pei Yang
b6439bc889 flake: add plugin lzn-auto-require 2024-08-23 14:26:44 +02:00
Ching Pei Yang
0f77675e84 lz.n: generate less code 2024-08-23 14:26:44 +02:00
Ching Pei Yang
369d5a3169 lz.n: wrap lua code in function 2024-08-23 14:26:44 +02:00
Ching Pei Yang
3064acad93 lib: add mkLznBinding 2024-08-23 14:26:44 +02:00
Ching Pei Yang
2d696c99d6 nvim-tree: load nvim-tree if openOnSetup 2024-08-23 14:26:44 +02:00
Ching Pei Yang
14733b8890 nvim-tree: move to lz.n keymaps 2024-08-23 14:26:44 +02:00
Ching Pei Yang
f1676e6936 lib: add mkLznBinding 2024-08-23 14:26:44 +02:00
Ching Pei Yang
9825c65f6c lib: change lz.n spec "inlineLua" types to str 2024-08-23 14:26:44 +02:00
Ching Pei Yang
547f323ab6 lz.n: missing type check 2024-08-23 14:26:44 +02:00
Ching Pei Yang
3b6df3941d lib: add lznKeySpec example 2024-08-23 14:26:44 +02:00
Ching Pei Yang
1928851e7e lz.n: process key maps 2024-08-23 14:26:44 +02:00
Ching Pei Yang
05e18c6631 remove unused 2024-08-23 14:26:44 +02:00
Pei Yang Ching
aba0e3ec9c lib: fix lz.n map type 2024-08-23 14:26:44 +02:00
Ching Pei Yang
65f4fa41f1 lib: add lz.n KeySpec 2024-08-23 14:26:44 +02:00
Pei Yang Ching
3bf022d591 nvim-tree: use lazy 2024-08-23 14:26:44 +02:00
Pei Yang Ching
86e56965c8 lazy: add setupOpts support 2024-08-23 14:26:44 +02:00
Pei Yang Ching
5e7c92d298 fix: broken optPlugins 2024-08-23 14:26:44 +02:00
Pei Yang Ching
4402102657 switch to other hacky array-table syntax 2024-08-23 14:26:44 +02:00
Pei Yang Ching
2ff606a743 wrap lazy init code in function 2024-08-23 14:26:44 +02:00
Ching Pei Yang
6465ee7b41 flake: update lz.n 2024-08-23 14:26:44 +02:00
Ching Pei Yang
c70e9e5eb5 lib: add lznPluginTableType 2024-08-23 14:26:44 +02:00
Ching Pei Yang
67e9f8b8bc lib: export lznPluginType 2024-08-23 14:26:44 +02:00
Ching Pei Yang
cf8ef6afe7 lz.n: load lz.n 2024-08-23 14:26:44 +02:00
Ching Pei Yang
fade02f9c9 lz.n: add basic lazy.plugins option 2024-08-23 14:26:44 +02:00
Pei Yang Ching
e3e0bd0b9b lib: add basic lz.n plugin spec type 2024-08-23 14:26:44 +02:00
Pei Yang Ching
6c7cfca128 add lazy module skeleton 2024-08-23 14:26:44 +02:00
Pei Yang Ching
8f10767543 flake: add lz.n plugin 2024-08-23 14:26:44 +02:00
Pei Yang Ching
f37f90d824 maps: fix missing description 2024-08-23 14:26:44 +02:00
Ching Pei Yang
b268b5c082 remove unused 2024-08-23 14:26:44 +02:00

View file

@ -6,7 +6,7 @@
inherit (builtins) map mapAttrs filter;
inherit (lib.attrsets) mapAttrsToList filterAttrs;
inherit (lib.strings) concatLines concatMapStringsSep optionalString;
inherit (lib.trivial) showWarnings;
inherit (lib.trivial) showWarnings pipe;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryAfter mkLuarcSection resolveDag entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
@ -42,7 +42,14 @@ in {
toLuaKeymap = bind: "vim.keymap.set(${toLuaObject bind.mode}, ${toLuaObject bind.key}, ${toLuaObject (getAction bind)}, ${toLuaObject (getOpts bind)})";
maps = concatLines (map toLuaKeymap cfg.keymaps);
maps =
pipe
# listOf mapOption
cfg.keymaps
[
(map toLuaKeymap)
concatLines
];
keymaps = maps;
in {