You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a feature request I'd like to try to implement myself.
The situation is this: you have a compilation error in your file:
compiler: cannot use &implementation{…} (value of type *implementation) as Manager value in return statement: *implementation does not implement Interface (missing method MissingMethod) [InvalidIfaceAssign]
I think we can use this to parse out the implementation and Interface and pass it on to Impl to let it generate our missing methods.
A second part to this would be to check the current file with treesitter to get the correct identifier name from other already implemented methods.
Eg. we already have func (i *implementation) Foo {}, but we're missing the implementation of Bar, if we use :Imp Interface we'd get func (i *implementation) Bar{} instead of func (implementation *implementation) Bar{} (I know it's just typing :Imp i Interface instead, but I keep forgetting 😄 )
Please let me know if this is something you'd want in your plugin.
(I'll probably write these as a wrapper around calling :Impl with your plugin anyway, but I might as well add them if you want)
The text was updated successfully, but these errors were encountered:
first off, the plugin is just binding for existing cli tools. As I see this, it would take too much time, but I don't have much spare time because of uni.
so I will add this to my backed list, but I don't think that I will implement something like this
No worries, I was thinking about making a PR myself for this if you want, we can still see if we add this to the plugin itself based on how well it integrates.
Hi,
I have a feature request I'd like to try to implement myself.
The situation is this: you have a compilation error in your file:
I think we can use this to parse out the implementation and Interface and pass it on to Impl to let it generate our missing methods.
A second part to this would be to check the current file with treesitter to get the correct identifier name from other already implemented methods.
Eg. we already have
func (i *implementation) Foo {}
, but we're missing the implementation of Bar, if we use :Imp Interface we'd getfunc (i *implementation) Bar{}
instead offunc (implementation *implementation) Bar{}
(I know it's just typing :Imp i Interface instead, but I keep forgetting 😄 )Please let me know if this is something you'd want in your plugin.
(I'll probably write these as a wrapper around calling :Impl with your plugin anyway, but I might as well add them if you want)
The text was updated successfully, but these errors were encountered: