Git Product home page Git Product logo

Comments (9)

Neko1993 avatar Neko1993 commented on June 12, 2024 3

Hi!

We use an additional folder in the project directory. It describes all the classes and auto-completion works great. You can also describe functions in your language there.

from lego-spikeprime-mindstorms-vscode.

PeterStaev avatar PeterStaev commented on June 12, 2024 1

Hey @TravelTrader , this is on my wish list too, but so far did not find a good way to achieve this...

from lego-spikeprime-mindstorms-vscode.

BlockOG avatar BlockOG commented on June 12, 2024 1

For the spike library you can just put this file in the same folder as the program you're doing rn https://github.com/sanjayseshan/spikeprime-tools/blob/master/spiketools/hub/spike.py (I'm not sure if it has everything, but probably not since there is spike.control which can't be in the same file)

from lego-spikeprime-mindstorms-vscode.

TravelTrader avatar TravelTrader commented on June 12, 2024

Can I help you in any way?
I'm new with VSCode but I am coding for many years now. Maybe we can add this feature together in any way?

from lego-spikeprime-mindstorms-vscode.

PeterStaev avatar PeterStaev commented on June 12, 2024

Well, this is my first vscode extension as well 😄 Problem is I haven't found a way how to include custom language autocompletions in a plugin. Right now from what I understand they fully rely on the native language service that comes with the given language.

from lego-spikeprime-mindstorms-vscode.

TravelTrader avatar TravelTrader commented on June 12, 2024

Respect for this useful extension if it's your first.
But I see the problem with the autocompletions. I'll tell you if I'd find anything, of course.

from lego-spikeprime-mindstorms-vscode.

PeterStaev avatar PeterStaev commented on June 12, 2024

Seems it might be possible to use python.autoComplete.extraPaths: https://code.visualstudio.com/docs/python/editing#_enable-intellisense-for-custom-package-locations

Not sure if it will be possible to create and distribute mock PY files with all the methods provided from the LEGO hub in the extension and then users to add the extraPaths settings to their workspace and point it to the directory within the plugin. Or even better - to have the extension auto append its autocomplete folder to the list when it is loaded.

from lego-spikeprime-mindstorms-vscode.

GSG-Robots avatar GSG-Robots commented on June 12, 2024

For the spike library you can just put this file in the same folder as the program you're doing rn https://github.com/sanjayseshan/spikeprime-tools/blob/master/spiketools/hub/spike.py (I'm not sure if it has everything, but probably not since there is spike.control which can't be in the same file)

We use this for us and it does have all functions, just mixed together into one single file. We had to sort out control functions and move them into a seperate file, etc.

from lego-spikeprime-mindstorms-vscode.

Ruimtewese avatar Ruimtewese commented on June 12, 2024

@GSG-Robots and @PeterStaev the suggested work around using the 'spike.py' file also works with a 'mindstorms.py' file in the root directory.

from lego-spikeprime-mindstorms-vscode.

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.