Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Completions result is not adequate #502

Open
@danielnowakowski

Description

@danielnowakowski

I'm using version 2.9.4 and I've noticed that completions feature does not work as expected.

Please look at the following code (file test2.js):

class TestClass {
    met1(arg1) {
        console.log(arg1);
    }
}

const myObj = new TestClass();
my

Cursor is placed just after 'my' at the end and I'm triggering completion feature. I'm expecting to have 'myObj' in the results and probably some other possibilities with 'my' somewhere in the names.

Initialize request:

Content-Length: 303

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"rootUri":"file://PROJECT_PATH","capabilities":{"workspace":{"applyEdit":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true}},"synchronization":{"didSave":true}}}}}

Completion request:

Content-Length: 240

{"jsonrpc":"2.0","id":3,"method":"textDocument/completion","params":{"textDocument":{"uri":"file://FILE_PATH/test2.js"},"position":{"line":7,"character":2}}}

Result is attached in file. Please notice, that uri is changed by me before publishing this issue, but it is proper.

output_file.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions