Skip to content

Commit d80fe80

Browse files
committed
fixup! feat: workspace symbols
1 parent 50cdc66 commit d80fe80

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Diff for: test/next_ls/runtime_test.exs

+7-1
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,18 @@ defmodule NextLs.RuntimeTest do
6666
severity: :warning,
6767
message:
6868
"variable \"arg1\" is unused (if the variable is not meant to be used, prefix it with an underscore)",
69-
position: 4,
69+
position: position,
7070
compiler_name: "Elixir",
7171
details: nil
7272
}
7373
] = Runtime.compile(pid)
7474

75+
if Version.match?(System.version(), ">= 1.15.0") do
76+
assert position == {4, 11}
77+
else
78+
assert position == 4
79+
end
80+
7581
File.write!(file, """
7682
defmodule Bar do
7783
def foo(arg1) do

Diff for: test/next_ls_test.exs

+3-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ defmodule NextLSTest do
158158
path: Path.join([cwd, "lib", file])
159159
})
160160

161+
char = if Version.match?(System.version(), ">= 1.15.0"), do: 11, else: 0
162+
161163
assert_notification "textDocument/publishDiagnostics", %{
162164
"uri" => ^uri,
163165
"diagnostics" => [
@@ -167,7 +169,7 @@ defmodule NextLSTest do
167169
"message" =>
168170
"variable \"arg1\" is unused (if the variable is not meant to be used, prefix it with an underscore)",
169171
"range" => %{
170-
"start" => %{"line" => 3, "character" => 0},
172+
"start" => %{"line" => 3, "character" => ^char},
171173
"end" => %{"line" => 3, "character" => 999}
172174
}
173175
}

Diff for: test/test_helper.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{:ok, _pid} = Node.start(:"nextls#{System.system_time()}", :shortnames)
22

3-
Logger.configure(level: :warn)
3+
Logger.configure(level: :warning)
44

55
timeout =
66
if System.get_env("CI", "false") == "true" do

0 commit comments

Comments
 (0)