Open hansec opened 6 years ago
I found some other projects which have alrady implemented various snippets. Maybe we should just copy-paste them...
Is there a way to make these a bit more intelligent?
In Atom, I often find myself typing end sub
tab and that inserts the snippet for an entire new subroutine, which is super annoying.
Perhaps just adding a new snippet for end subroutine
with prefix end sub
would override the subroutine
one in this case?
I think it's the same thing for module
, I just don't type that that often, so I don't remember at this moment.
EDIT: done in https://github.com/dparkins/language-fortran/pull/111
Yeah, one of the reasons I have not added this yet is that for Atom and VSCode at least the most common snippets are already provided (since the "language support" packages are required for the LS anyways). Beyond that getting the LS provided snippets and the "language support" package snippets to play nice is a little tricky, since you end up with two snippets that are almost identical. I hope to have some time to look in to this again soon though.
Add snippet support for common fortran blocks (
if
,do
, etc.) and scope declarations (module
,subroutine
, etc.).examples ($0 denotes cursor position)