Hello Nim experts!
This is my first post here! I'm interested in getting started with Nim, which looks pretty elegant to me.
As I'm trying to setup a friendly development environment in my journey learning Nim, I was wondering which Nim VSCode extension are you using?
In the VSCode marketplace, I see particularly two popular extensions:
Do they support Nim 2.0? (it doesn't really seem to be mentioned in the doc)
Thanks for your advice,
Guillaume
This is great!
It’s probably a good idea to update the readme since it currently it says things such as “Presently (2020-12-13)” and “The port was done as a learning exercise for myself (@saem)”…
Great!
@Yardanico does the saem version work with the nim/langserver lsp? It wasn't clear if it supported that one or PMunch'es version.
No it doesn't seem to.. but I'm a new Nim user so I might have just done something wrong.
I just tried installing the nimlanguageserver (via nimble, which requires a path to gcc to compile it) and then enabling it via the { "nim.provider": "lsp" } setting JSON or the setting UI directly in the Nim configuration / Nim: Provider dropdown (to change from nimsuggest to lsp), and upon vscode restart, I see the error popup "The Nim Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted".
I just noted giaco's reply, which mentioned the github issue - so it seems saem's plugin works with nimsuggest only. BTW I personally find the naming rather confusing: nimlangserver vs nimlsp (as mentioned in that ticket).
It would be good one day to have one official vscode plugin.
so it seems saem's plugin works with nimsuggest only
Funnily enough it's a bit different, saem and kosz extensions both work with nimsuggest by default, but saem's plugin also offers an option to use LSP instead, albeit only with nimlangserver.
I've made some mistakes in my post switching nimlangserver and nimsuggest, sorry
saem extension works directly with nimsuggest OR LSP == nimlangserver, no nimlsp
So is the fork (nim-lang/vscode-nim) the recommended one or the forked (saem/vscode-nim)?
The former hasn't been published to the extension marketplace. The latter hasn't seen a release in a year and a half.
I can see how its confusing, and that's certainly unfortunate. NimLSP really only makes sense if you know what LSP is. It's a protocol to unify how editors talk to language tools. Basically one standardised way to write language plugins across languages and editors. The idea (which VSCode has fumbled despite Microsoft being the creator of the protocol) is that you install one LSP client in your editor and then you can simply run different LSP servers for each of the languages you want to program in.
That being said NimLSP (and nimlangserver) is just a protocol layer on top of nimsuggest. Nimsuggest is the tool that actually does the Nim debug information gathering, then NimLSP just formats these messages as LSP instead of using the nimsuggest proprietary format.
Hello!
Unfortunately the vscode-nim does not work at all on Windows 10. There are a lot tiny errors and issues. Now I am testing another trying to use vscode-nim. Syntax Highlight (nim, nimble, nim.cfg) Code Completion Signature Help Goto Definition Find References File outline Build-on-save Workspace symbol search Quick info All features doesn't work.
VSCode give the errors:
could not load: pcre64.dll
[Info - 12:59:38 PM] Connection to server got closed. Server will restart. true
[Error - 12:59:38 PM] Server process exited with code 1. could not load: pcre64.dll
It is so long process . a lot files was recompiled. after that installations I get not working vscode and Nim at all. Have anybody some good manual how to install the vscode-nim pluging?