From 0860db73ae6fd9a6f6347219d820bf026a6b8b91 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 27 Sep 2026 17:38:39 +0200 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- .config/nvim/plugin/mod.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .config/nvim/plugin/mod.lua (limited to '.config/nvim/plugin') diff --git a/.config/nvim/plugin/mod.lua b/.config/nvim/plugin/mod.lua new file mode 100644 index 0000000..a26bf46 --- /dev/null +++ b/.config/nvim/plugin/mod.lua @@ -0,0 +1,25 @@ +-- register keybinds and commands for lua/mod/?.lua here + +-- jobs.lua +vim.api.nvim_create_user_command('Jobs', function(a) require('mod.jobs').select(a) end, + { nargs = 0, desc = 'jobs: List running jobs' }) + +vim.keymap.set('n', ';j', 'Jobs', { desc = 'fzf: jobs' }) + +-- termopen.lua +vim.api.nvim_create_user_command('Term', function(a) require('mod.termopen').term(a) end, + { nargs = '*', desc = 'termopen: Terminal' }) +vim.api.nvim_create_user_command('Make', function(a) require('mod.termopen').make(a) end, + { nargs = '*', desc = 'termopen: Make' }) + +vim.keymap.set('n', 'm', 'Make', { desc = 'termopen: make' }) +vim.keymap.set('n', 't', 'Termopen', { desc = 'termopen: shell' }) +vim.keymap.set('n', 'l', function() + vim.ui.input({ prompt = 'Launch: ' }, function(input) + if input ~= nil and #input > 0 then + require('mod.termopen').termopen({ cmd = { vim.env.SHELL, '-c', input } }) + else + vim.notify('termopen: empty arguments', vim.log.levels.WARN) + end + end) +end, { desc = 'termopen: Launch' }) -- cgit 1.4.1