Add nvim config

This commit is contained in:
2026-09-25 11:17:06 +10:00
parent f92bc95a5a
commit 5d4fd4f526
3 changed files with 69 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
return {
board = "studuino:avr:studuino",
port = "/dev/ttyUSB0",
baudrate = "115200",
}
+41
View File
@@ -0,0 +1,41 @@
# Arduino Neovim Configuration
This directory contains the Neovim configuration for Arduino development, using [Arduino-Nvim](https://github.com/yuukiflow/Arduino-Nvim) with **LazyVim**.
## Installation
1. Copy `lua/plugins/arduino.lua` to your LazyVim plugins directory (e.g. `~/.config/nvim/lua/plugins/`)
2. Copy `.arduino_config.lua` to your Arduino project root
## Custom Keybinds
| Keybind | Command | Description |
|---------|---------|-------------|
| `<Leader>mc` | `:InoCheck` | Compile and verify sketch |
| `<Leader>mu` | `:InoUpload` | Upload sketch to board |
| `<Leader>ms` | `:InoStatus` | Display board, port & FQBN status |
| `<Leader>mg` | `:InoGUI` | Open GUI for board/port selection |
| `<Leader>mm` | `:InoMonitor` | Open serial monitor |
| `<Leader>ml` | `:InoLib` | Open library manager |
| `<Leader>mb` | `:InoSelectBoard` | Select Arduino board |
| `<Leader>mp` | `:InoSelectPort` | Select Arduino port |
| `<Leader>mr` | `:InoUploadReset` | Upload with manual reset (UNO R4 WiFi) |
## Board Configuration
Edit `.arduino_config.lua` to set your board, port, and baudrate:
```lua
return {
board = "studuino:avr:studuino",
port = "/dev/ttyUSB0",
baudrate = "115200",
}
```
## Requirements
- [arduino-cli](https://arduino.github.io/arduino-cli/latest/installation/)
- [arduino-language-server](https://github.com/arduino/arduino-language-server)
- [Telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
+23
View File
@@ -0,0 +1,23 @@
return {
"yuukiflow/Arduino-Nvim",
ft = "arduino",
opts = {
use_default_keymaps = false,
keymaps = {
{ mode = "n", key = "<Leader>mc", func = ":InoCheck<CR>" },
{ mode = "n", key = "<Leader>mu", func = ":InoUpload<CR>" },
{ mode = "n", key = "<Leader>ms", func = ":InoStatus<CR>" },
{ mode = "n", key = "<Leader>mg", func = ":InoGUI<CR>" },
{ mode = "n", key = "<Leader>mm", func = ":InoMonitor<CR>" },
{ mode = "n", key = "<Leader>ml", func = ":InoLib<CR>" },
{ mode = "n", key = "<Leader>mb", func = ":InoSelectBoard<CR>" },
{ mode = "n", key = "<Leader>mp", func = ":InoSelectPort<CR>" },
{ mode = "n", key = "<Leader>mr", func = ":InoUploadReset<CR>" },
},
},
dependencies = {
"nvim-telescope/telescope.nvim",
-- optional: remove if you use Neovim's built-in LSP (>= 0.11)
"neovim/nvim-lspconfig",
},
}