Skip to content

Commit e34d0aa

Browse files
authored
Fix dialyzer errors (#334)
1 parent ea47c9c commit e34d0aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/language_server/lib/language_server/providers/document_symbols.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbols do
4545
end
4646

4747
defp list_symbols(src) do
48-
case ElixirSense.string_to_quoted(src, 0, @max_parser_errors, line: 0) do
48+
case ElixirSense.string_to_quoted(src, 1, @max_parser_errors, line: 1) do
4949
{:ok, quoted_form} -> {:ok, extract_modules(quoted_form)}
5050
{:error, _error} -> {:error, :compilation_error}
5151
end
@@ -315,8 +315,8 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbols do
315315

316316
defp location_to_range(location) do
317317
%{
318-
start: %{line: location[:line], character: location[:column] - 1},
319-
end: %{line: location[:line], character: location[:column] - 1}
318+
start: %{line: location[:line] - 1, character: location[:column] - 1},
319+
end: %{line: location[:line] - 1, character: location[:column] - 1}
320320
}
321321
end
322322

0 commit comments

Comments
 (0)