oni icon indicating copy to clipboard operation
oni copied to clipboard

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

Open otto-dev opened this issue 6 years ago • 0 comments

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: https://github.com/onivim/oni/blob/c66787474ca09ebe6f3445fbef66f465ce12f08c/browser/src/Services/Snippets/SnippetSession.ts#L71-L76

snippet is undefined.

otto-dev avatar Sep 06 '19 08:09 otto-dev