A Neovim plugin that provides Arduino IDE-like functionality directly in your editor. This plugin integrates Arduino development tools with Neovim, offering a seamless development experience for Arduino projects.
- Arduino project compilation and verification
- Code upload to Arduino boards with reset support for UNO R4 WiFi
- Serial monitor with configuration display and clean interface
- Board and port management with GUI selection
- Advanced library management with Telescope integration
- Visual indicators for installed libraries (✅)
- Update detection and management (🔄)
- Cached library data for faster loading
- LSP support for Arduino development
- Real-time status monitoring
- Persistent configuration storage
- Debug upload functionality for troubleshooting
- arduino-cli (latest stable version)
- arduino-language-server
- clangd (latest stable version)
- telescope.nvim
- nvim-lspconfig
Add this to your lua/plugins/arduino.lua:
return {
"yuukiflow/Arduino-Nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"neovim/nvim-lspconfig",
},
config = function()
-- Load Arduino plugin for .ino files
vim.api.nvim_create_autocmd("FileType", {
pattern = "arduino",
callback = function()
require("Arduino-Nvim")
end,
})
end,
}If you're developing locally:
return {
dir = vim.fn.stdpath("config") .. "/lua/Arduino-Nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"neovim/nvim-lspconfig",
},
config = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = "arduino",
callback = function()
require("Arduino-Nvim")
end,
})
end,
}All commands are prefixed with <Leader>a followed by a single letter:
| Keymap | Command | Description |
|---|---|---|
<Leader>ac |
:InoCheck |
Compile and verify current sketch |
<Leader>au |
:InoUpload |
Upload sketch to board |
<Leader>ar |
:InoUploadReset |
Upload with manual reset (for UNO R4 WiFi) |
<Leader>am |
:InoMonitor |
Open serial monitor with configuration display |
<Leader>as |
:InoStatus |
Display current board, port, and FQBN status |
<Leader>al |
:InoLib |
Open library manager (Telescope interface) |
<Leader>ag |
:InoGUI |
Open GUI for setting board and port |
<Leader>ap |
:InoSelectPort |
Select Arduino port from available ports |
<Leader>ab |
:InoSelectBoard |
Select Arduino board from available boards |
| Command | Description |
|---|---|
:InoDebugUpload |
Debug upload process with detailed information |
:InoList |
List all available Arduino ports |
:InoSetBaud <rate> |
Set serial monitor baudrate (e.g. :InoSetBaud 9600) |
The plugin automatically creates and manages a .arduino_config.lua file in your
project directory to store:
- Board type (FQBN)
- Port selection
- Baudrate settings
return {
board = "arduino:renesas_uno:unor4wifi",
port = "/dev/ttyACM0",
baudrate = "9600",
}The serial monitor shows:
- Board configuration details
- Port settings (baudrate, bits, parity, etc.)
- Real-time Arduino output
- Clean exit with
Ctrl-CorEsc
For Arduino UNO R4 WiFi upload issues:
- Try reset upload:
<Leader>aror:InoUploadReset - Debug upload:
:InoDebugUploadfor detailed information - Manual reset: Hold reset button 8-10 seconds, then immediately upload
- Check connection: Ensure USB cable is properly connected
- Use a good quality USB cable, cheap cables gave me problems
The library manager provides a Telescope interface with:
- ✅ Visual indicators for installed libraries
- 🔄 Update detection for outdated libraries
- One-click installation and updates
- Cached library data for improved performance
- Search and filter capabilities
The plugin includes LSP configuration for Arduino development:
- Syntax highlighting and code completion
- Error checking and diagnostics
- Function signatures and documentation
- Go to definition support
sketch/
├── sketch.ino # Main Arduino sketch
├── .arduino_config.lua # Plugin configuration (auto-generated)
└── .arduino/ # Arduino CLI build artifacts
└── sketches/
└── sketch.ino.bin # Compiled binary-
"No device found on ttyACM0"
- Try
<Leader>arfor reset-based upload - Check USB connection
- Verify board selection with
<Leader>ag
- Try
-
Monitor connection issues
- Check baudrate setting with
<Leader>as - Ensure correct port selection
- Try
:InoDebugUploadfor diagnostics
- Check baudrate setting with
-
LSP not working
- Ensure
arduino-language-serveris installed - Check
clangdis in PATH - Restart Neovim after installation
- Ensure
:InoDebugUpload- Show detailed upload process:InoList- List all available ports:InoStatus- Show current configuration
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - Do whatever you want with the code. No attribution required.