-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Can't find references of the contents of an inline function #184
Comments
I am willing to take this up. Can you please point to which files to look at? |
@TwistingTwists hi! I believe someone else has started on this, but I'll confirm with them if they've made progress. |
@apoorv-2204 can I assign this to you? |
@apoorv-2204 you should be able to use the code snippet above and follow the instructions in order to reproduce |
@TwistingTwists I think you can tackle this if you're still interested! |
Aye aye captain. Point me to the files I need to look ! |
maybe its is generating that code, as for cache , whenever it is going through any code base. |
lib/next_ls.ex |
@TwistingTwists i think the primary problem is somewhere a query is being made or something that is only accounting for the line number and not also the column number |
That is a good head start for me. I will familiarise my self with the codebase and ask more questions as I explore more |
Awesome, thanks! |
Interesting, let me check locally |
Oh, I think VScode is giving you those hints. Add a reference to the get function somewhere and try again. |
Oh I see now. You are right! I think that I know how to fix this. Let me check if I'm correct and open a PR. |
When we check what's under the cursor we always get the function that's defined in that line because, as you point out, we are not taking the cursor column into account (link). My first thought was to modify the query to take the line into account just like we do when querying the I think that we should:
Next question is how to proceed for a migration in the |
To get the column information, we'll need to do some AST analyzing or ask José on the forum how to get the column info in the compilation tracer event. I prefer the latter, as it'll be the easiest. If it needs a fix to elixir core, then I'm okay with fixing it and just having it be a progressive enhancement as folks update their elixir versions. Re: José, it's tempting to just mention him here on GitHub, but I prefer to go through his preferred channels (the forum) for questions, to respect his time. I can post a question when I get home. |
I agree with you @mhanberg. Asking José sounds like the best course of action. |
https://elixirforum.com/t/how-to-find-function-clause-column-information/59177 cc @crbelaus we'll see what José says |
José fixed this upstream, so let's get that fixed and just have it be a progressive enhancement as folks upgrade their elixir versions. To implement this @crbelaus, you'll have to locally develop with main elixir (i believe you can just do It might be valuable to add a CI job that tests with the |
Cool I believe we can get the available column information for newest Elixir versions and just fall back to line 1 like we do now for older versions 👍 |
Description
Trying to find references to the GenServer module located at the cursor will not work, as it thinks you are trying to find references to the function definition of Cache.get/0
Acceptance Criteria
it should find references to the symbol under the cursor
The text was updated successfully, but these errors were encountered: