Closed sudkumar closed 5 years ago
This feature is already available.
I'm able to import it using the first method that is shown in the gif but I am not sure how you are adding it in the case of new Order
. (I can not see that f in the floating window and I don't know how to use it. :/)
Oh... I just found out that, by doing control+f
, I can add use statement
when I am doing $item = new Item
. But I'm not able to add it when Item::staticMethodCall
(without assigning to a variable.). Like, is there a way to auto add use statement for the Keyword under the cursor?
Okay. I got it. By pressing control+f
while in floating window selection mode, I can insert the use statement. Thank you.
Hi,
somehow the gif is not viewable anymore. So how do I manually trigger to insert a use
statement? When I type the class, I get an autocomplete suggestion for inserting the class. I am looking for the scenario where I am not typing the class name (so no autocompletion), which shortcut can I use to add the import?
Thanks
NOT A BUG
I'm using the plugin and loving it with CoC. I am working on Typescript on frontend and Laravel on backend. While autocompletion works perfectly fine on laravel project, I was just wondering if there is a way to auto inject the
use
statements which is under the cursor? I don't want to install another plugin (phpactor/phpactor
) just to add this feature as this plugin (usingIntelephense
) correctly suggests the auto completion and namespaces. Please help :).