Skip to content

Commit a6d5986

Browse files
committed
fix: better completions for function references
Removes `&` as a trigger character, which will allow completions to trigger as normal once you start typing after. This shouldn't be a problem as the only two completions offered by that are `&` and `&&`, and operators like `||` don't complete anyway.
1 parent 5846724 commit a6d5986

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/next_ls.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ defmodule NextLS do
159159
completion_provider:
160160
if init_opts.experimental.completions.enable do
161161
%GenLSP.Structures.CompletionOptions{
162-
trigger_characters: [".", "@", "&", "%", "^", ":", "!", "-", "~", "/", "{"],
162+
trigger_characters: [".", "@", "%", "^", ":", "!", "-", "~", "/", "{"],
163163
resolve_provider: true
164164
}
165165
end,

lib/next_ls/autocomplete.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ defmodule NextLS.Autocomplete do
7272
hint = List.to_string(local_or_var)
7373

7474
expand_container_context(code, :expr, hint, runtime, env) ||
75-
expand_local_or_var(hint, List.to_string(local_or_var), runtime, env)
75+
expand_local_or_var(hint, hint, runtime, env)
7676

7777
{:local_arity, local} ->
7878
expand_local(List.to_string(local), true, runtime, env)

0 commit comments

Comments
 (0)