riju icon indicating copy to clipboard operation
riju copied to clipboard

LSP support meta-issue

Open raxod502 opened this issue 3 years ago • 0 comments

This issue tracks languages which could use LSP support.

Language Language server Blocker Branch
Ada Ada Language Server Fails to compile (see below)
crystal Scry Server hangs due to error (see below) wip/crystal-lsp
crystal Scry (with hotfix) Server returns error (see below) wip/crystal-lsp-hotfix
csharp OmniSharp Server returns no completions wip/csharp-lsp
fsharp FsAutoComplete Server returns error (see below) wip/fsharp-lsp
groovy Groovy Language Server Server returns no completions wip/groovy-lsp
javascript TypeScript Language Server Need to disable native Monaco completions
kotlin Kotlin Language Server Server returns various errors (see below) wip/kotlin-lsp
nim Nim Language Server Installation fails (see below) wip/nim-lsp
pascal Pascal Language Server Fails to compile (see below) wip/pascal-lsp
perl Perl-LanguageServer Server hangs due to error (see below) wip/perl-lsp
r languageserver Server emits malformed output wip/r-lsp
scala Metals Doesn't work with Scala scripts (see below) wip/scala-lsp
typescript TypeScript Language Server Need to disable native Monaco completions

Ada

/usr/bin/ld: /src/build/lang/ada/src/ada_language_server/libadalang_21.0.0_955d2554/alire/cache/dependencies/gnatcoll_21.0.0_6c0439a3/obj/gnatcoll/relocatable/gnatcoll_support.o: relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC

Crystal

can't find file 'prelude'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?

See https://github.com/crystal-lang-tools/scry/issues/173.

{
  "jsonrpc": "2.0",
  "id": null,
  "error": {
    "code": -32001,
    "message": "Couldn't parse (LSP::Protocol::NotificationMessage | LSP::Protocol::RequestMessage) from {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"textDocument/completion\",\"params\":{\"textDocument\":{\"uri\":\"file:///tmp/riju/05eb4d59-c495-4877-bc33-79e8e4d8f7f6/main.cr\"},\"position\":{\"line\":1,\"character\":1},\"context\":{\"triggerKind\":1}}} at 1:1",
    "data": [
      "../../../usr/share/crystal/src/json/from_json.cr:291:3 in 'start'",
      "../../scry/src/scry.cr:40:1 in '__crystal_main'",
      "../../../usr/share/crystal/src/crystal/main.cr:105:5 in 'main'",
      "__libc_start_main",
      "_start",
      "???"
    ]
  }
}

F#

/tmp/riju/3240f700-2ff7-48c0-ab3c-ecb593f0e251/main.fsx (1,1)-(1,1) parse error Could not load file or assembly 'System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
  Code: -32603

Kotlin

No script runtime was found in the classpath: class
'kotlin.script.templates.standard.ScriptTemplateWithArgs' not found.
Please add kotlin-script-runtime.jar to the module
dependencies. kotlin(MISSING_SCRIPT_STANDARD_TEMPLATE)
Internal error.
  Code: -32603
java.util.concurrent.CompletionException: java.lang.RuntimeException: Reached end of file before reaching char 1
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Reached end of file before reaching char 1
	at org.javacs.kt.position.PositionKt.offset(Position.kt:54)
	at org.javacs.kt.KotlinTextDocumentService.recover(KotlinTextDocumentService.kt:77)
	at org.javacs.kt.KotlinTextDocumentService.access$recover(KotlinTextDocumentService.kt:36)
	at org.javacs.kt.KotlinTextDocumentService$completion$1.invoke(KotlinTextDocumentService.kt:158)
	at org.javacs.kt.KotlinTextDocumentService$completion$1.invoke(KotlinTextDocumentService.kt:36)
	at org.javacs.kt.util.AsyncExecutorKt$sam$java_util_function_Supplier$0.get(AsyncExecutor.kt)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	... 3 more

Nim

     Error: Build failed for package: nimlsp
        ... Details:
        ... Execution failed with exit code 1
        ... Command: "/usr/bin/nim" c --noNimblePath -d:NimblePkgVersion=0.2.4 -d:release --path:"/root/.nimble/pkgs/ast_pattern_matching-1.0.0"  --path:"/root/.nimble/pkgs/jsonschema-0.2.1"  --path:"/root/.nimble/pkgs/ast_pattern_matching-1.0.0"  -o:"/tmp/nimble_36088/githubcom_PMunchnimlsp_#head/nimlsp" "/tmp/nimble_36088/githubcom_PMunchnimlsp_#head/src/nimlsp.nim"
        ... Output: Hint: used config file '/etc/nim/nim.cfg' [Conf]
        ... /tmp/nimble_36088/githubcom_PMunchnimlsp_#head/src/nimlsppkg/utfmapping.nim(1, 8) Warning: imported and not used: 'tables' [UnusedImport]
        ... /tmp/nimble_36088/githubcom_PMunchnimlsp_#head/src/nimlsppkg/suggestlib.nim(11, 8) template/generic instantiation of `mImport` from here
        ... /opt/nim/nimsuggest/nimsuggest.nim(19, 17) Error: cannot open file: compiler/options

Pascal

Free Pascal Compiler version 3.0.4+dfsg-23 [2019/11/25] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling pasls.lpr
(3104) Compiling lsp.pas
(3104) Compiling basic.pas
/tmp/pascal-language-server/lsp.pas(219,29) Error: (4001) Incompatible types: got "<class method type of procedure(TObject;TObject;PPropInfo;TJSONObject;UTF8String;var TObject) of object;Register>" expected "<procedure variable type of procedure(TObject;TObject;PPropInfo;TJSONObject;UTF8String;var TObject);Register>"
/tmp/pascal-language-server/lsp.pas(239,12) Error: (5000) Identifier not found "specialize"
/tmp/pascal-language-server/lsp.pas(239,23) Fatal: (2003) Syntax error, ";" expected but "identifier TLSPSTREAMING" found
Fatal: (1018) Compilation aborted

Perl

LS: apply_all_roles (Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x564877f99460), Perl::LanguageServer::Methods::textDocument, Perl/LanguageServer/Methods/textDocument.pm)
LS: apply_all_roles (Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x564877f99460), Perl::LanguageServer::Methods::workspace, Perl/LanguageServer/Methods/workspace.pm)
LS: ERROR: encountered object 'Coro=HASH(0x5648780701e0)', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /usr/local/share/perl/5.30.0/Perl/LanguageServer.pm line 260.

background_parser folders = {
  "file:///tmp/riju/b85393ce-8216-4d4b-a8fe-949d29d5b0c0" => "/tmp/riju/b85393ce-8216-4d4b-a8fe-949d29d5b0c0",
}
state_dir = /tmp/riju/b85393ce-8216-4d4b-a8fe-949d29d5b0c0/.vscode/perl-lang
initial parsing done, loaded  files, parsed 1 files, 1 files

Scala

expected class or object definition

raxod502 avatar Jun 15 '21 05:06 raxod502