-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adding code snippets #23
base: master
Are you sure you want to change the base?
Conversation
7a82b9a
to
714266a
Compare
Code snippets and auto-complete using https://github.com/aminya/Matlab-Snippets - A full collection converted from official JSON files
@aminya This looks really interesting! Great work and thank you for adding the PR. @rlivings39 Could you take a look at this when you have some availability? In general looks good, but I haven’t taken it for a spin nor dug fully through the src yet. |
The only limitation is that only one all-in-one snippet is generated for each function that has all the possible arguments (if there where two possibilities to chose, 1st one is chosen). To have multiple snippets (more compact than all-in-one snippet), I should probably parse Matlab documentation of each function online and then extract the first few lines. |
Looks cool. The load time was not really noticeable on my system.
I wonder if providing this data as a custom autocomplete provider rather than in snippets would be more usable given the complexity of the data you're providing. That would require writing a bit more code but could let you give a much more tailored user experience. Multiple cursors Snippets in many locations |
@elpollodiablo84, do you have any thoughts on this? I ask because I know you also maintain a MATLAB-oriented Atom package forked from this one. |
I think this PR is a really good idea, but like @rlivings39 I think it's better suited as a custom autocomplete provider. This probably means a lot of rework, but I think it will be worth it. |
Multiple cursors problem is fixed now |
Also, I used a local Matlab installation, but I don't have all the toolboxes. I wonder if that affects the number of snippets. I will try to generate snippets on a university machine to see if any new snippets are generated. |
@Gimly this seems like a great feature for the VSC extension repo, any thoughts? 🙏🏾 |
Code snippets and auto-complete using https://github.com/aminya/Matlab-Snippets - A full collection converted from official JSON files