this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvim: claude shortcut

+12
+12
nvim/lua/config/keys.lua
··· 138 138 vim.notify('Copied: ' .. ref, vim.log.levels.INFO) 139 139 end, { desc = "Copy filepath:line to clipboard" }) 140 140 141 + -- claude edit 142 + vim.api.nvim_create_user_command("Claude", function(opts) 143 + vim.ui.input({ prompt = "Claude: " }, function(input) 144 + if not input or input == "" then return end 145 + local ref = string.format("@%s:%d-%d", vim.fn.expand("%:."), opts.line1, opts.line2) 146 + local prompt = string.format("%s (in %s)", input, ref) 147 + vim.cmd(vim.o.columns >= 160 and "botright vnew" or "botright new") 148 + vim.fn.jobstart({ "claude", "--permission-mode", "acceptEdits", prompt }, { term = true }) 149 + end) 150 + end, { range = true }) 151 + vim.keymap.set({ "n", "v" }, "<leader>C", ":Claude<cr>", { desc = "Claude edit" }) 152 + 141 153 vim.keymap.set("n", "<leader>PP", "<cmd>Lazy<cr>") 142 154 143 155 vim.keymap.set("n", "<leader>LC", "<cmd>ConfigLocalEdit<cr>")