File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
modules/plugins/runner/run-nvim Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 5
5
...
6
6
} : let
7
7
inherit ( lib . modules ) mkIf mkDefault ;
8
- inherit ( lib . nvim . binds ) addDescriptionsToMappings mkSetLznBinding mkSetLuaLznBinding ;
8
+ inherit ( lib . nvim . binds ) mkKeymap ;
9
9
10
10
cfg = config . vim . runner . run-nvim ;
11
- mappingDefinitions = options . vim . runner . run-nvim . mappings ;
12
- mappings = addDescriptionsToMappings cfg . mappings mappingDefinitions ;
11
+ inherit ( options . vim . runner . run-nvim ) mappings ;
13
12
in {
14
13
config = mkIf cfg . enable {
15
14
vim = {
21
20
cmd = "Run" ;
22
21
23
22
keys = [
24
- ( mkSetLznBinding "n" mappings . run "<cmd>Run<CR>" )
25
- ( mkSetLznBinding "n" mappings . runOverride "<cmd>Run!<CR>" )
26
- ( mkSetLuaLznBinding "n" mappings . runCommand ''
27
- function()
28
- local input = vim.fn.input("Run command: ")
29
- if input ~= "" then require("run").run(input, false) end
30
- end
31
- '' )
23
+ ( mkKeymap "n" cfg . mappings . run "<cmd>Run<CR>" { desc = mappings . run . description ; } )
24
+ ( mkKeymap "n" cfg . mappings . runOverride "<cmd>Run!<CR>" { desc = mappings . runOverride . description ; } )
25
+ ( mkKeymap "n" cfg . mappings . runCommand ''
26
+ function()
27
+ local input = vim.fn.input("Run command: ")
28
+ if input ~= "" then require("run").run(input, false) end
29
+ end
30
+ '' {
31
+ desc = mappings . run . description ;
32
+ lua = true ;
33
+ } )
32
34
] ;
33
35
} ;
34
36
You can’t perform that action at this time.
0 commit comments