Comments (9)
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.
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.
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.
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.
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.
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.
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.
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.
@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)
- How to make the program exit after it's finished HOT 4
- Importing self made modules. HOT 2
- How to download to the brick? HOT 3
- Can't Upload program when unplug USB cable and Plugged again HOT 4
- automatic saving in slot HOT 2
- List more advanced features :-) HOT 1
- Bluetooth not showing up on windows 10 HOT 4
- Cannot find imports. HOT 5
- FLL Coach here (not an actual "issue") HOT 1
- Is it works? HOT 2
- MemoryError when uploading and starting files multiple times HOT 5
- Support for HubOS 3 HOT 14
- question about usage HOT 2
- Enhance COM ports lists HOT 6
- Reconnection over BT fails after disconnect from VScode extension for some time
- spike prime new os connect HOT 1
- Trouble uploading code via VSC HOT 6
- Extension creates *.assembled.py file HOT 1
- Connection to Spike Prime HUB fails over USB without error message HOT 22
- Inlcude a screen shot of the run buttons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lego-spikeprime-mindstorms-vscode.