Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VSCode] Completion suggestions aren't refreshing during typing one by one character #4756

Closed
dos65 opened this issue Dec 22, 2022 · 3 comments · Fixed by scalameta/metals-vscode#1278
Labels
bug Something that is making a piece of functionality unusable completions Tickets related to completion functionality vscode Related to VS Code

Comments

@dos65
Copy link
Member

dos65 commented Dec 22, 2022

Describe the bug

I stated digging a bit what is going on and noticed that in this case often doesn't ask LSP server for more completion even if prev result returns isIncomplete = true

Project setup:

// build.sbt

scalaVersion := "2.13.10"
libraryDependencies ++= List("com.typesafe.play" %% "play-json" % "2.9.3")

// src/main/scala/sample/sample.scala

package sample

class Sample {
  Json // <- issue here - no completions if you start typing `Json` one by one character
          //  in theory after having 3 char in query (`Jso@@`) there should be results  but there is no request to LSP 
  Json@@ // <- triggering it using shortcut after typing works well
}

It looks like a specific issue of vscode or metals-extension.
Extension version: Pre-release v1.20.9
VSCode version: 1.74.2

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

0.11.9+213-4ab55247-SNAPSHOT

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Dec 22, 2022

Thanks for reporting! Looks like this is an issue in VS Code microsoft/vscode#155738

I see some workaround mentioned there.

@tgodzik tgodzik added bug Something that is making a piece of functionality unusable completions Tickets related to completion functionality labels Dec 22, 2022
@dos65
Copy link
Member Author

dos65 commented Dec 22, 2022

Thanks for reporting! Looks like this is an issue in VS Code microsoft/vscode#155738

I see some workaround mentioned there.

oh, cool. It seems like in this case for VSCode we can return some fake completion like "complete typing ..." without text edit

@ckipp01 ckipp01 added the vscode Related to VS Code label Dec 23, 2022
@ckipp01
Copy link
Member

ckipp01 commented Dec 23, 2022

Just confirming that I have tried this in another client (Neovim) and the issue doesn't exist there.

dos65 added a commit to dos65/metals-vscode that referenced this issue Dec 27, 2022
If Vscode receives emptuy completion list it ignores `isIncomplete` field.
Fixes: scalameta/metals#4756

Vscode issue: microsoft/vscode#155738
dos65 added a commit to dos65/metals-vscode that referenced this issue Dec 27, 2022
If Vscode receives emptuy completion list it ignores `isIncomplete` field.
Fixes: scalameta/metals#4756

Vscode issue: microsoft/vscode#155738
dos65 added a commit to dos65/metals-vscode that referenced this issue Dec 27, 2022
If Vscode receives emptuy completion list it ignores `isIncomplete` field.
Fixes: scalameta/metals#4756

Vscode issue: microsoft/vscode#155738
@tgodzik tgodzik added this to the Metals v0.11.10 milestone Dec 29, 2022
@tgodzik tgodzik reopened this Jan 2, 2023
@tgodzik tgodzik moved this to Done in Metals Issue Board Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable completions Tickets related to completion functionality vscode Related to VS Code
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants