feat: add arduino shit
This commit is contained in:
@@ -60,6 +60,7 @@ map("n", "<Leader>in", ":Telescope notify<CR>", opts) -- [i]nspect [n]oti
|
||||
map("n", "<Leader>ip", ":TroubleToggle<CR>", opts) -- [i]nspect [p]roblems
|
||||
map("n", "<Leader>ii", ":Lspsaga incomming_calls<CR>", opts) -- [i]nspect [i]ncomming_calls
|
||||
map("n", "<Leader>io", ":Lspsaga outgoing_calls<CR>", opts) -- [i]nspect [o]utgoing_calls
|
||||
map("n", "<Leader>ic", ":Copilot panel<CR>", opts) -- [i]nspect [c]opilot suggestions
|
||||
|
||||
map("v", "<Leader>ai", ":'<,'>NeoAIContext<CR>")
|
||||
map("n", "<Leader>ai", ":NeoAI<CR>")
|
||||
@@ -106,6 +107,13 @@ map("n", "<A-S-J>", "yyp", opts)
|
||||
map("v", ">", ">gv", opts)
|
||||
map("v", "<", "<gv", opts)
|
||||
|
||||
-- resize
|
||||
map("n", "<C-Up>", ":resize -4<CR>", opts)
|
||||
map("n", "<C-Down>", ":resize +4<CR>", opts)
|
||||
map("n", "<C-Left>", ":vertical resize -4<CR>", opts)
|
||||
map("n", "<C-Right>", ":vertical resize +4<CR>", opts)
|
||||
|
||||
|
||||
-- If i paste with p, the replaced content doesnt replace my clipboard
|
||||
map("v", "p", '"_dP', opts)
|
||||
|
||||
|
@@ -23,7 +23,6 @@ return {
|
||||
vim.api.nvim_set_keymap("n", "<C-g>", "<cmd>lua _Lazygit_toggle()<CR>", { noremap = true, silent = true })
|
||||
|
||||
|
||||
|
||||
local arduinoMonitor = Terminal:new({
|
||||
cmd = "arduino-cli monitor -p /dev/ttyUSB0",
|
||||
direction = "horizontal",
|
||||
@@ -40,6 +39,23 @@ return {
|
||||
arduinoMonitor:toggle()
|
||||
end, {})
|
||||
|
||||
local arduinoCompileUploadMonitor = Terminal:new({
|
||||
cmd = "arduino-cli compile --upload && arduino-cli monitor -p /dev/ttyUSB0",
|
||||
direction = "horizontal",
|
||||
float_opts = {
|
||||
winblend = 0,
|
||||
padding = 10,
|
||||
border = "single",
|
||||
},
|
||||
on_close = function()
|
||||
Terminal:close()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("ArduinoUploadMonitor", function()
|
||||
arduinoCompileUploadMonitor:toggle()
|
||||
end, {})
|
||||
|
||||
local arduinoUpload = Terminal:new({
|
||||
cmd = "arduino-cli compile --upload",
|
||||
direction = "horizontal",
|
||||
|
Reference in New Issue
Block a user