You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you type a new identifier, for example a struct or function definition, there is one completion item with the exact part of the name that you have already typed. This will update after each key stroke, because CompletionList.isIncomplete is always set to true, so the client will continuously re-request completions:
If you confirm this completion, nothing happens because it just replaces the typed identifier, which already was the exact same text. Even if you haven't typed the end yet, it won't be inserted for you. So I think this completion item is pretty useless and could be removed. (In Sublime the popup heavily flickers if there are no other completions visible, and I wasn't able to find a good workaround for that on the client side).
I was able to remove the completion by excluding exact matches at
--- a/src/requests/completions.jl+++ b/src/requests/completions.jl@@ -259,7 +259,7 @@ function collect_completions(x::StaticLint.Scope, spartial, state::CompletionSta
possible_names = String[]
for n in x.names
resize!(possible_names, 0)
- if is_completion_match(n[1], spartial)+ if is_completion_match(n[1], spartial) && n[1] != spartial
push!(possible_names, n[1])
end
if (nn = string_macro_altname(n[1]); nn !== nothing) && is_completion_match(nn, spartial)
Although I don't know where the x.names exactly come from or whether there is a better solution.
The text was updated successfully, but these errors were encountered:
This is an ok solution for the symptom, but imho the more correct fix here is to not offer the current binding. Otherwise you wouldn't get these somewhat useful completions:
When you type a new identifier, for example a struct or function definition, there is one completion item with the exact part of the name that you have already typed. This will update after each key stroke, because
CompletionList.isIncomplete
is always set totrue
, so the client will continuously re-request completions:LanguageServer.jl/src/requests/completions.jl
Line 98 in 864e4ef
Example screenshot from VSCode:
If you confirm this completion, nothing happens because it just replaces the typed identifier, which already was the exact same text. Even if you haven't typed the
end
yet, it won't be inserted for you. So I think this completion item is pretty useless and could be removed. (In Sublime the popup heavily flickers if there are no other completions visible, and I wasn't able to find a good workaround for that on the client side).I was able to remove the completion by excluding exact matches at
LanguageServer.jl/src/requests/completions.jl
Line 262 in 864e4ef
like this:
Although I don't know where the
x.names
exactly come from or whether there is a better solution.The text was updated successfully, but these errors were encountered: