vim-arduino icon indicating copy to clipboard operation
vim-arduino copied to clipboard

Plugin Not Starting With Lazy.nvim

Open lycheeje11y opened this issue 1 year ago • 1 comments

I'm on mac sonoma with neovim 0.10.0. My probem is that the plugin does not even start. I used lazy.nvim to install it, and I "vim-arduino" in the loaded plugins. But when I open an ino file, the Blink.ino in the examples repository, for instance, there is no Arduino command set.

Here is my vim-arduino.lua file:

return {
	"stevearc/vim-arduino",
	config = function()
		local keymap = vim.keymap
		keymap.set("n", "<cmd>ArduinoAttach<CR>", "<leader>aa", { desc = "Automatically attach to your board" })
		keymap.set("n", "<cmd>ArduinoVerify<CR>", "<leader>av", { desc = "Compile" })
		keymap.set("n", "<cmd>ArduinoUpload<CR>", "<leader>au", { desc = "Upload" })
		keymap.set(
			"n",
			"<cmd>ArduinoUploadAndSerial<CR>",
			"<leader>aus",
			{ desc = "Build, upload, and connect for debugging" }
		)
		keymap.set("n", "<cmd>ArduinoSerial<CR>", "<leader>as", { desc = "Connect for debugging" })
		keymap.set("n", "<cmd>ArduinoChooseBoard<CR>", "<leader>ab", { desc = "Choose board" })
		keymap.set("n", "<cmd>ArduinoChooseProgrammer", "<leader>ap", { desc = "Choose programmer" })
	end,
}

lycheeje11y avatar Aug 05 '24 18:08 lycheeje11y

What worked for me was stating the filetype like so:

return {
  "stevearc/vim-arduino",
  ft = "arduino",
  ...
}

SebastianBilek avatar Aug 25 '24 03:08 SebastianBilek