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

Metals (Scala) language server integration works, but not auto-complete selection #2756

Description

@otto-dev

I've installed the Scala metals language server, and configured it like so:

    "language.scala.languageServer.command": "metals-vim",
    "language.scala.languageServer.rootFiles": ["build.sbt", ".git"],

Everything works fine, except that if I try to accept an auto-complete item, the original word is instead deleted, and the completion throws an error. See below:

deepin-screen-recorder_Select area_20190906181121

The behavior is the same when using other metals executables, such as metals-vscode, metals-client etc.

I could imagine it could be a straight forward fix if you know where to look in the oni code.

The error, Cannot read property 'split' of undefined originates here:

export const makeSnippetConsistentWithExistingWhitespace = (
snippet: string,
info: BufferIndentationInfo,
) => {
return snippet.split("\t").join(info.indent)
}

snippet is undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions