diff --git a/apps/language_server/lib/language_server/source_file.ex b/apps/language_server/lib/language_server/source_file.ex index 3043e8b4b..9b7cac83a 100644 --- a/apps/language_server/lib/language_server/source_file.ex +++ b/apps/language_server/lib/language_server/source_file.ex @@ -216,9 +216,6 @@ defmodule ElixirLS.LanguageServer.SourceFile do {:ok, code} -> code |> to_string() - |> lines() - |> remove_indentation(String.length("@spec ")) - |> Enum.join("\n") {:error, _} -> spec @@ -267,12 +264,6 @@ defmodule ElixirLS.LanguageServer.SourceFile do end end - defp remove_indentation([line | rest], length) do - [line | Enum.map(rest, &String.slice(&1, length..-1))] - end - - defp remove_indentation(lines, _), do: lines - def lsp_character_to_elixir(_utf8_line, lsp_character) when lsp_character <= 0, do: 1 def lsp_character_to_elixir(utf8_line, lsp_character) do diff --git a/apps/language_server/test/providers/completion_test.exs b/apps/language_server/test/providers/completion_test.exs index 73821ba40..245f98932 100644 --- a/apps/language_server/test/providers/completion_test.exs +++ b/apps/language_server/test/providers/completion_test.exs @@ -1111,9 +1111,9 @@ defmodule ElixirLS.LanguageServer.Providers.CompletionTest do The summary ``` @spec add( - a_big_name :: integer, - b_big_name :: integer - ) :: integer + a_big_name :: integer, + b_big_name :: integer + ) :: integer ``` """ } diff --git a/apps/language_server/test/server_test.exs b/apps/language_server/test/server_test.exs index cc2b5ec5d..44ac991d3 100644 --- a/apps/language_server/test/server_test.exs +++ b/apps/language_server/test/server_test.exs @@ -1015,8 +1015,8 @@ defmodule ElixirLS.LanguageServer.ServerTest do ``` @spec inspect(device, item, keyword) :: - item - when item: var + item + when item: var ``` """ }, diff --git a/apps/language_server/test/source_file_test.exs b/apps/language_server/test/source_file_test.exs index 54c922934..2bcc7adcc 100644 --- a/apps/language_server/test/source_file_test.exs +++ b/apps/language_server/test/source_file_test.exs @@ -30,9 +30,9 @@ defmodule ElixirLS.LanguageServer.SourceFileTest do ``` @spec format_spec( - String.t(), - keyword() - ) :: String.t() + String.t(), + keyword() + ) :: String.t() ``` """ end