adalessa / laravel.nvim

Plugin for Nvim to work with laravel projects.
MIT License
235 stars 13 forks source link

adding flags #72

Closed t0mri closed 5 months ago

t0mri commented 6 months ago

Problem: i dont think we can add flags while making *(model, controller, etc) using this plugin. for example if i try to add add --resource flag to the make:controller option selected telescope meny by entering the controller name and the flags in the Argument name field, as expected it just created a controller with name of "Name --flag". refer the image below image

Potential solution: instead of asking users for the name of the thing they make how about let the enter any that are supposed to be entered after make:*. For example,

instead of asking:
Argument name <require>: NewController --resource
and do:
...
class People --resource extends Controller
...

how about asking:
Name + flags <required>: NewController --resource
and do:
split the input by " "(space) and pass it to the command ( php artisan ...)
adalessa commented 6 months ago

Hi, currently this case is supported when selecting from telescope to confirm with <c-y> which after asking for the arguements will ask for the options. I see your point, I am not completely conform with the current execution since lost from view the available options. I will consider that.

I think as a middle solution this can be added as a new action and is up to the user to configure it on use, or add an specific option maybe.

adalessa commented 5 months ago

Closing it for now due to inactivity. If you think this is still an issue please re-open with details.