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

Postfix completion seems to be inconsistently sending completion item data #3317

Open
jonathan-elize opened this issue Nov 5, 2024 · 0 comments

Comments

@jonathan-elize
Copy link

I see that sometimes the postfix completions such as nnull work correctly, but sometimes they don't in terms of whether or not they replace the original text:

snippet.mov

In the second completion I didn't type anything but just selected the completion. In the first I typed a bit first to get the nnull to be higher in the list first.

Here's an example of when the text is not replaced:

{
  command = {
    arguments = { "78", "0" },
    command = "java.completion.onDidSelect",
    title = ""
  },
  data = {
    pid = "0",
    rid = "78"
  },
  insertText = "if (b != null) {\n\t${0}\n}",
  insertTextFormat = 2,
  insertTextMode = 2,
  kind = 15,
  label = "nnull",
  labelDetails = {
    description = "Creates an if statement and checks if the expression does not resolve to null"
  },
  sortText = "999999999"
}

Here's an example of the payload when it is replaced:

{
  command = {
    arguments = { "100", "2" },
    command = "java.completion.onDidSelect",
    title = ""
  },
  data = {
    pid = "2",
    rid = "100"
  },
  insertTextFormat = 2,
  insertTextMode = 2,
  kind = 15,
  label = "nnull",
  labelDetails = {
    description = "Creates an if statement and checks if the expression does not resolve to null"
  },
  sortText = "999999999",
  textEdit = {
    insert = {
      ["end"] = {
        character = 10,
        line = 6
      },
      start = {
        character = 10,
        line = 6
      }
    },
    newText = "if (b != null) {\n\t${0}\n}",
    replace = {
      ["end"] = {
        character = 10,
        line = 6
      },
      start = {
        character = 10,
        line = 6
      }
    }
  },
  textEditText = "if (b != null) {\n\t${0}\n}"
}

Does anyone have any ideas why this might be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant