-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: use sketch.json for per sketch fqbn and port #50
Comments
Good idea! We now read from the sketch file and use that to set the board & port values. When a sketch file is present those values are not passed to the |
I have tried the new feature, and as far as I can see,
|
I've updated it to read the sketch file (if one exists) on BufReadPost for .ino files. Does that suit your purpose? |
Works perfectly now, thanks a lot! |
Based on the sketch specification, one may add a file named
sketch.json
to a sketch folder, so set the board metadata (like fqbn and port) on a per sketch basis. This file can be created using the arduino-cliboard attach
command.Would it be possible to use the settings from this file, if it is present, and the global
g:arduino_*
variables /ArduinoChoose*
commands only in case that no such file exists? In particular:--fqbn
and--port
(using vim-arduino global settings) only if not given in thesketch.json
.sketch.json
in the tag bar if present.As another feature, would it be possible to call
board attach
to save such metadata, after selecting it withArduinoChoose*
, per sketch instead of globally (maybe as a new vim-arduino command or.vimrc
option)?I think this would be a helpful improvement if one is working on several sketches which are compiled for different board types / uploaded on different ports, so that there is no need to change these settings when switching to another sketch. Also it would use a settings format which is compatible with using plain arduino-cli on the command line.
The text was updated successfully, but these errors were encountered: