Skip to content

Commit

Permalink
fix(references): ignore references to elixir source code
Browse files Browse the repository at this point in the history
I think these lines are recorded as references when macros in the elixir
standard library are expanded.
  • Loading branch information
mhanberg committed Aug 8, 2023
1 parent 55ead79 commit 6ff4c17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/next_ls.ex
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ defmodule NextLS do
WHERE refs.identifier = ?
AND refs.type = ?
AND refs.module = ?
AND NOT like('/home/runner/work/elixir/%', refs.file)
""",
[function, "function", module]
)
Expand All @@ -206,6 +207,7 @@ defmodule NextLS do
FROM "references" as refs
WHERE refs.module = ?
and refs.type = ?
AND NOT like('/home/runner/work/elixir/%', refs.file)
""",
[module, "alias"]
)
Expand Down Expand Up @@ -712,5 +714,6 @@ defmodule NextLS do
end
end
end

defp clamp(line), do: max(line, 0)
end

0 comments on commit 6ff4c17

Please sign in to comment.