Git Product home page Git Product logo

Comments (4)

stevearc avatar stevearc commented on May 21, 2024

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 arduino-cli command. There's also a new ArduinoAttach command that will run arduino-cli board attach in the background. Lastly, ArduinoChooseBoard and ArduinoChoosePort will update the value in the sketch.json file, if it exists.

from vim-arduino.

xenos1984 avatar xenos1984 commented on May 21, 2024

I have tried the new feature, and as far as I can see, s:ReadSketchJson() is called at plugin initialization and when calling :ArduinoAttach, and it looks for sketch.json in the current working directory. However, this method apparently does not detect an already existing file, unless one runs arduino#InitializeConfig() with the working directory set to the sketch folder. Would it be possible to:

  • call s:ReadSketchJson() when entering a buffer with a .ino file,
  • search for the sketch.json in the folder of this .ino file?

from vim-arduino.

stevearc avatar stevearc commented on May 21, 2024

I've updated it to read the sketch file (if one exists) on BufReadPost for .ino files. Does that suit your purpose?

from vim-arduino.

xenos1984 avatar xenos1984 commented on May 21, 2024

Works perfectly now, thanks a lot!

from vim-arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.