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

Improve Phoenix integration #281

Merged
merged 14 commits into from
Nov 27, 2023
Merged

Improve Phoenix integration #281

merged 14 commits into from
Nov 27, 2023

Conversation

gugahoa
Copy link
Contributor

@gugahoa gugahoa commented Nov 9, 2023

Description

This PR has two features:

  1. Enable Go To Definition when inside a Phoenix scope;
  2. Override Auto Complete for the controller argument if the function is one of the predefined ones from Phoenix.Route;
  3. Override Auto Complete for the action argument if the function is one of the predefined ones from Phoenix.Route.

The PR is in draft, anything can be discussed. I though this could be a valuable contribution given the widespread usage of Phoenix.

TODO

  • Feature Gate this behind Elixir >1.14 – it uses Macro.path/2
  • Expand scope alias when they're defined with module attributes or variables

@gugahoa
Copy link
Contributor Author

gugahoa commented Nov 9, 2023

@lukaszsamson to ensure I'm not overstepping my bounds: This PR was made with the intention of discussing it all – if it's valuable or not; what approaches should be taken; what should make into the PR or not. I'm pretty open to discard it, or re-write from scratch after discussion.

Since I wanted to ensure it's possible to do it at all, I made a PR with working example instead of an issue to discuss.

@lukaszsamson
Copy link
Collaborator

Nice. I was intending to look into that at some point as well

@gugahoa
Copy link
Contributor Author

gugahoa commented Nov 10, 2023

Marking it as ready for review. CI is passing, the 3 jobs that aren't passing in this PR are also not passing in the main branch

@gugahoa gugahoa marked this pull request as ready for review November 10, 2023 16:42
@lukaszsamson lukaszsamson merged commit 02c101d into elixir-lsp:master Nov 27, 2023
26 of 29 checks passed
@lukaszsamson
Copy link
Collaborator

Thanks

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

Successfully merging this pull request may close these issues.

2 participants