code completion / hover for Micro Foucs file routines (and others)
Smitty2018 opened this issue · 7 comments
After a while I came back to this extension, which I've used for editing COBOL years ago (complete new setup) because I now have to do some more COBOL in a Micro Focus environment.
Previously I've seen a completion or hover for routines like CBL_CREATE_FILE
and there is still a reference in the repo so I guess that's still in.
How to trigger this? [CTRL]+[SPACE] after CALL
does not work (I don't know if it did before).
If you update to the latest, you will find the property coboleditor.hover_show_known_api
set this to true to enable it
The 'old' support appeared when you hovered over a known api.
No snippets are present for any CBL APIs.
Cool, thanks, that was super quick! A setting without a text looks unfinished but it does work quite good. Is there a reason to not always enable this (without a setting)?
Snippets like the ones for the functions would be very useful. Something similar for the file routines would be nice, removing the need to copy + paste from other sources. When I've tried that something strange was suggested (doesn't look like COBOL):
Should I open a new issue for snippet support of the "known api" routines?
@Smitty2018 - the snippet above was included when I had support for the coboldoc utility, it has no purpose now.. so I've removed it
As I don't use that, that's fine by me (other users may would have liked a setting - but that's only useful if there would be "full support" for coboldoc - whatever that means).
Can you share some insights why there's a setting of hover_show_known_api
that needs to be enabled (and documented)? Is there any possible side-effect of having it on?
Would it be possible to add snippets for the known APIs?
As I don't use that, that's fine by me (other users may would have liked a setting - but that's only useful if there would be "full support" for coboldoc - whatever that means).
coboldoc can be found @ https://www.npmjs.com/package/coboldoc and https://github.com/brunopacheco1/coboldoc
Would it be possible to add snippets for the known APIs?
Time, the current list of known APIs is 183, so that is a lot of snippets.
Snippets might not be the right way to do this either because snippets only insert code at the current location, which is a problem for COBOL APIs, as the parameters have to live elsewhere (working-storage/local-storage or thread-local).
coboldoc can be found @ https://www.npmjs.com/package/coboldoc and https://github.com/brunopacheco1/coboldoc
I may checkout COBOLDoc later. If it works like javadoc it seems very useful; although most use of that for me was the IDE's tooltips - if I understand that correctly this was partial in this extension and is now gone.
Would it be possible to add snippets for the known APIs?
Time, the current list of known APIs is 183, so that is a lot of snippets.
Wow 183 is a real huge amount! I see that time will likely be an issue here (not sure if it is possible to apply some fancy regex to extract the definitions out of the docs), that would possibly need some support by Micro Focus to get it in a different format than HTML [or PDF].
Hm, Micro Focus seems to now have an own extension which I should checkout, too. Maybe it provides snippets already. Do you know of a feature comparison of this extension and theirs which I can check?
Snippets might not be the right way to do this either because snippets only insert code at the current location, which is a problem for COBOL APIs, as the parameters have to live elsewhere
For me the parameters would not be a problem, because the help linked to already contains the necessary definitions/copybooks and often the program already has the variables... and it is similar to the function snippets: You can easily replace the variables with the ones needed, also using the variable-suggestion so that's really fine.
... but now I miss the hover + documentation link for the intrinsic functions :-/
It would be nice to have it there, too, providing the small summary and linking to https://www.microfocus.com/documentation/visual-cobol/vc70/DevHub/HRLHLHPDF795.html (only 74 listed, not 183...)
Micro Focus seems to now have an own extension which I should checkout, too. Maybe it provides snippets already.
Yes, it does have snippets for various language features. I dont thin it has any for library routines.
Do you know of a feature comparison of this extension and theirs which I can check?
The main difference is that the Micro Focus extension includes debugging support
If you do try it out, remember to disable or uninstall this extension because both are trying to provide services for COBOL, so it may not be obvious which feature is being provided by which extension.
I am thinking about providing an extension pack for the "Micro Focus Extension's" with some of the features from this extension that naturally complements it (and leaving out the duplicate bits).