initial commit
This commit is contained in:
11
lua/aichat.lua
Normal file
11
lua/aichat.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
map("n", "<leader>aa", function()
|
||||
Snacks.input.input({ prompt = "Enter prompt" }, function(value)
|
||||
if value ~= nil then
|
||||
vim.cmd(":read !aichat -c " .. value .. " /nothink")
|
||||
-- local output = vim.fn.system("!aichat -c " .. value .. " /nothink")
|
||||
-- local lines = vim.split(output, "\n", { plain = true })
|
||||
-- local bufnr = target_bufnr or vim.api.nvim_get_current_buf()
|
||||
-- vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user