Skip to content

Commit

Permalink
Add support for completing type after ::
Browse files Browse the repository at this point in the history
  • Loading branch information
plux committed Sep 20, 2024
1 parent 45dbb62 commit 56afc92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/els_lsp/src/els_completion_provider.erl
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ find_completions(
{ItemFormat, _POIKind} =
completion_context(Document, Line, Column, Tokens),
complete_type_definition(Document, Name, ItemFormat);
%% Check for "::"
[{'::', _} | _] = Tokens ->
{ItemFormat, _POIKind} =
completion_context(Document, Line, Column, Tokens),
complete_type_definition(Document, '', ItemFormat);
%% Check for ":: atom"
[{atom, _, Name}, {'::', _} | _] = Tokens ->
{ItemFormat, _POIKind} =
Expand Down

0 comments on commit 56afc92

Please sign in to comment.