Closed Xkonti closed 4 days ago
Is this still the case with the latest release?
@jmgomez I'm on 1.2.0. I just updated the NimLangServer per notification that there's a new version. Now getting a different error set:
VSCode output in Nim Lsp
:
[Trace - 10:13:05 AM] Received notification 'window/showMessage'.
[Trace - 10:13:05 AM] Received notification 'extension/statusUpdate'.
[Trace - 10:13:05 AM] Received notification 'extension/statusUpdate'.
[Trace - 10:13:05 AM] Sending request 'textDocument/inlayHint - (25)'.
An exception occured
key not found: d:\repos\surreal\tests\test_cbor_decoder_integers.nim
tables.nim(232) raiseKeyError
ls.nim(761) tryGetNimsuggest
routes.nim(511) inlayHint
lstransports.nim(64) anonymous
lstransports.nim(152) runRpc
DBG [Processsing Message] request="\"textDocument/inlayHint\""
DBG inlayHint received...
[Trace - 10:13:05 AM] Received notification 'extension/statusUpdate'.
[Trace - 10:13:05 AM] Received notification 'extension/statusUpdate'.
DBG ShowMessage message="Using Nim Compiler Version 2.0.2 [Windows: amd64] from C:\\\\Users\\\\onlin\\\\.nimble\\\\pkgs2\\\\nim-2.0.2-3aa3fb7ac65816001bf960eb3a458681cebb1ff7\\\\bin"
INF Starting nimsuggest root="d:\\repos\\surreal\\tests\\test_cbor_decoder_integers.nim" timeout=120000 path="C:\\Users\\onlin\\.nimble\\pkgs2\\nim-2.0.2-3aa3fb7ac65816001bf960eb3a458681cebb1ff7\\bin\\nimsuggest" workingDir="d:\\repos\\surreal"
[Trace - 10:13:05 AM] Received notification 'window/showMessage'.
DBG Nimsuggest Capabilities capabilities={}
[Trace - 10:13:05 AM] Received notification 'extension/statusUpdate'.
ERR NimSuggest Error (stderr) err=
DBG NimSuggest needed to be restarted due to an error
WRN Server stopped. projectFile="d:\\repos\\surreal\\tests\\test_cbor_decoder_integers.nim"
DBG ShowMessage message="Server failed with ."
ERR [RunRPC] msg="key not found: d:\\repos\\surreal\\tests\\test_cbor_decoder_integers.nim" req=ok(textDocument/inlayHint)
The project I'm trying it on (branch cbor
):
https://github.com/Xkonti/surrealdb.nim/tree/cbor
Please, update your Nim version, you are running 2.0.2
It also sounds like you are not running the latest nimlangserver
. The version is ouput in the LSP Status
in the Nim Panel
and at the beginning of the Nim Lsp
output log
Works fine for me
@jmgomez I'm using Nim devel:
PS D:\repos\surreal> nim -v
Nim Compiler Version 2.1.99 [Windows: amd64]
Compiled at 2024-09-12
Copyright (c) 2006-2024 by Andreas Rumpf
The NimLangServer installs it's own 2.0.2 version in as Nimble package for some unknown to me reason, and the extension seems to use it or something.
I outlined my installation procedure in the issue description. Not sure why this isn't working on my end :/
The fact that it installs 2.0.2
tells that you are using an old version. Latest version (1.16.0
) use nim 2.0.8
(due to the lock
file).
Also please, make sure you are using latest nimble
(0.16.1
)
@jmgomez I reinstalled Nim as the newest Devel and this made the nimble 0.16.1 available and that installed the NimLangServer with the proper 2.0.8. The extension actually works this time! This is great!
Whenever I turn on VSCode and open a .nim file / project the following set of errors shows up:
Current extension version:
1.0.2
- but the problem started with1.0.0
NimLangServer output:
Nim extension output:
Versions:
Nim installation process
Just in case I'm doing something wrong:
~\.nimble
andD:\tools\Nim
D:\tools\Nim
D:\tools\Nim
.\finish.exe
to install new Nim versionnimble install nimlangserver
- takes a while but completes successfully