Skip to content

Commit

Permalink
update elixir_sense
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Aug 8, 2023
1 parent a50c028 commit e54e2eb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions apps/elixir_ls_debugger/lib/debugger/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,11 @@ defmodule ElixirLS.Debugger.Server do
}
end)

env = %ElixirSense.Providers.Suggestion.Complete.Env{vars: vars}
env = %ElixirSense.Core.State.Env{vars: vars}
metadata = %ElixirSense.Core.Metadata{}

results =
ElixirSense.Providers.Suggestion.Complete.complete(prefix, env)
ElixirSense.Providers.Suggestion.Complete.complete(prefix, env, metadata)
|> Enum.map(&ElixirLS.Debugger.Completions.map/1)

{%{"targets" => results}, state}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ defmodule ElixirLS.LanguageServer.Experimental.Provider.Handlers.FindReferences
end
end)
|> Enum.reverse()
# ElixirSense returns references from both compile tracer and current buffer
# There may be duplicates
|> Enum.uniq()

response = Responses.FindReferences.new(request.id, references)
Logger.info("found #{length(references)} refs")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule ElixirLS.LanguageServer.Providers.Hover do
)
end

defp contents(%{docs: markdown}, subject, project_dir) do
defp contents(markdown, subject, project_dir) do
%{
kind: "markdown",
value: add_hexdocs_link(markdown, subject, project_dir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ defmodule ElixirLS.LanguageServer.Providers.References do
|> build_reference(uri, text)
end)
|> Enum.filter(&(not is_nil(&1)))
# ElixirSense returns references from both compile tracer and current buffer
# There may be duplicates
|> Enum.uniq()
end)
end

Expand Down
2 changes: 1 addition & 1 deletion dep_versions.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
elixir_sense: "3aea5e26d71d00c160033bd86451b11a69424b9d",
elixir_sense: "a495a9bfed95de84ee49f0f4f3c5768ae24d43b2",
dialyxir_vendored: "7e908b4d760c7329046e0ee3076be9156cd784e1",
jason_v: "c81537e2a5e1acacb915cf339fe400357e3c2aaa"
]
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"},
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
"dialyxir_vendored": {:git, "https://github.com/elixir-lsp/dialyxir.git", "7e908b4d760c7329046e0ee3076be9156cd784e1", [ref: "7e908b4d760c7329046e0ee3076be9156cd784e1"]},
"elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "3aea5e26d71d00c160033bd86451b11a69424b9d", [ref: "3aea5e26d71d00c160033bd86451b11a69424b9d"]},
"elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "a495a9bfed95de84ee49f0f4f3c5768ae24d43b2", [ref: "a495a9bfed95de84ee49f0f4f3c5768ae24d43b2"]},
"erl2ex": {:git, "https://github.com/dazuma/erl2ex.git", "244c2d9ed5805ef4855a491d8616b8842fef7ca4", []},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"jason_v": {:git, "https://github.com/elixir-lsp/jason.git", "c81537e2a5e1acacb915cf339fe400357e3c2aaa", [ref: "c81537e2a5e1acacb915cf339fe400357e3c2aaa"]},
Expand Down

0 comments on commit e54e2eb

Please sign in to comment.