stevearc/vim-arduino

Plugin Not Starting With Lazy.nvim

lycheeje11y opened this issue · 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,
}

What worked for me was stating the filetype like so:

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