We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e49ac1 commit 699a728Copy full SHA for 699a728
apps/language_server/lib/language_server/providers/completion.ex
@@ -326,7 +326,11 @@ defmodule ElixirLS.LanguageServer.Providers.Completion do
326
Atom.to_string(required_alias)
327
|> String.replace_prefix("Elixir.", "")
328
329
- indentation = 1..column_to_insert_alias |> Enum.map(fn _ -> " " end) |> Enum.join()
+ indentation =
330
+ if column_to_insert_alias >= 1,
331
+ do: 1..column_to_insert_alias |> Enum.map_join(fn _ -> " " end),
332
+ else: ""
333
+
334
alias_edit = indentation <> "alias " <> alias_value <> "\n"
335
336
struct(completion_without_additional_text_edit,
0 commit comments