Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model completion #106

Open
Bleksak opened this issue Sep 29, 2024 · 1 comment
Open

Model completion #106

Bleksak opened this issue Sep 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Bleksak
Copy link
Contributor

Bleksak commented Sep 29, 2024

Since this plugin already has some completions, is there a way of adding model completions?

There are couple of limitations though.

  1. getting the relevant model (possibly through lsp hover and then getting model info?)
  2. cmp context only contains the current line, we would need something for multiline completion, for example:
    User::create([
    'field' => '...'
    ]);
    will not complete properly with the cmp context
@adalessa adalessa added the enhancement New feature or request label Sep 30, 2024
@adalessa
Copy link
Owner

Of course I have thought about it but is not that simple, For a given model the plugin knows how to retrieve the fields, if the db is connected, but it's hard to get the right context, needs to be done with the lsp it needs to se at the completion level when to trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants