question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect parameter completion

See original GitHub issue

Versions

vim version: NVIM v0.4.3                                                                                                                                                                                                                                      
node version: v10.16.0
coc.nvim version: 0.0.74-15f685206a                                                                                                                                                                                                                         
term: xterm-256color                                                                                                                                                                                                                                        
platform: linux 

Messages

[coc.nvim] Using java from /usr/lib/jvm/java-8-openjdk-amd64, version: 8                                                           
[coc.nvim] JDT Language Server starting at /home/user/Testing/Nvim/Vanilla                                                             
[coc.nvim] JDT Language Server started  

Output channel: java

[Info  - 6:09:01 PM] JDT Language Server started
[object Object]

Describe the bug

This is the result after completing parameter for a function:

import java.util.ArrayList;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();

        int index = 0;
        String element = "Hello World";

        list.add(${1:index}, ${2:element});
    }
}

I would expect instead:

list.add(index, element);

Reproduce the bug

  1. Create mini.vim with:
set runtimepath^=~/.local/share/nvim/plugged/coc.nvim
filetype plugin indent on
syntax on
set hidden
  1. Create Main.java with:
import java.util.ArrayList;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();

        int index = 0;
        String element = "Hello World";
    }
}
  1. Type list. then select method add(int index, String element) then press ENTER.

I believe this has happened after I’ve updated jdt.ls with java.updateLanguageServer.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
chemzqmcommented, Feb 27, 2020

Fixed on latest release branch of coc.nvim.

3reactions
chemzqmcommented, Feb 27, 2020

I’ve made a fix to disable insertTextFormat for resolved item.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix “The Parameter is Incorrect” Error on External Hard ...
If the parameter is incorrect error comes, you will be unable to transfer, ... will begin now, and you need to wait for...
Read more >
Incorrect Parameter when associating many Jobs to an IO ...
The Problem:​​ Everytime a Job Object is to be associated with the Completion Port, the association fails with: SetInformationJobObject failed ...
Read more >
failed to create a new IO completion port. "the parameter is ...
Answered by: locked. failed to create a new IO completion port. "the parameter is incorrect" RRS feed.
Read more >
Code completion, wrong parameter names
Code completion, wrong parameter names Follow ... Hello,. i encountered some weird behaviour lately. I have small private java library, and when i ......
Read more >
72A - IBM
During processing for an ATTACH macro, the system encountered an error. ... The system found an incorrect parameter address when processing the ATTACH...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found