Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/elixir_ls_utils/lib/completion_engine.ex
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ defmodule ElixirLS.Utils.CompletionEngine do

:none ->
no()

# cursor_context/1 gains new context types with Elixir releases; an
# unknown one degrades to no suggestions instead of crashing the request
_other ->
no()
end
end

Expand Down
11 changes: 5 additions & 6 deletions apps/language_server/lib/language_server/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,11 @@ defmodule ElixirLS.LanguageServer.Parser do
{:error, diagnostic}

e ->
if is_struct(e) and
e.__struct__ in [
Phoenix.LiveView.Tokenizer.ParseError,
Phoenix.LiveView.HTMLTokenizer.ParseError,
Phoenix.LiveView.TagEngine.Tokenizer.ParseError
] do
if e.__struct__ in [
Phoenix.LiveView.Tokenizer.ParseError,
Phoenix.LiveView.HTMLTokenizer.ParseError,
Phoenix.LiveView.TagEngine.Tokenizer.ParseError
] do
diagnostic =
Diagnostics.from_error(:error, e, __STACKTRACE__, file, :no_stacktrace)

Expand Down
Loading