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

Support finding references for a function named "fun" #41

Closed
axelson opened this issue Aug 23, 2019 · 1 comment
Closed

Support finding references for a function named "fun" #41

axelson opened this issue Aug 23, 2019 · 1 comment

Comments

@axelson
Copy link
Member

axelson commented Aug 23, 2019

From what I can tell it is possible to find references from a call, but you can't find references from the definition of a function.

So this works:

  test "working example" do
    buffer = """
    defmodule A do
      def a_fun do
        B.Callee.fun()
                  ^
      end
    end
    """

    references = ElixirSense.references(buffer, 3, 14)
    assert references != []
  end

But this does not:

  test "elixir-ls references test" do
    buffer = """
    defmodule B.Callee do
      def fun() do
           ^
        :ok
      end
    end
    """

    references = ElixirSense.references(buffer, 2, 7)
    assert references != []
  end

I'm trying to use ElixirSense.references/3 (elixir-lsp/elixir-ls#39) but need to be able to find the references for a function from it's definition (which I think makes sense from a usability standpoint as well).

@axelson axelson changed the title Support finding references for a function from it's definition Support finding references for a function named "fun" Aug 24, 2019
@axelson
Copy link
Member Author

axelson commented Aug 24, 2019

This bug as originally worded was invalid so I'm just going to close in favor of the new bug I filed #42

@axelson axelson closed this as completed Aug 24, 2019
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

No branches or pull requests

1 participant