https://plugins.jetbrains.com/plugin/15128-nim
Provides Nim language support.
*Syntax highlighting - token-based and semantic
*Syntax errors highlighting
*Code completion, find usages and refactoring of local unqualified symbols
*Code folding
*Structure view
*Different forms of the same identifier are recognised properly, e.g. foo, f_O_O, fOO or even f oo
what do you think
IntelliJ is my daily driver, but I mostly stuck to VSCode for Nim because of better support although I otherwise loathe it. Nimatron was a good effort and progress was coming along nicely, but the developer retired it when Jetbrains released their plugin. Still, big props to the developer for his work on it.
The new Nim plugin is a good start. It's not feature complete - it lacks some things like jumping to definitions in other files, and commenting out the highlighted lines with a keyboard shortcut. It's not as good as VSCode's plugin, but it's mostly good enough to start using Jetbrains for Nim development.
The real worry is that 1) it is just some Jetbrains developer's 20% project, 2) since JB is now developing it, it is closed source and no one else can contribute or pick up the slack if the developer loses interest or moves on (as opposed to Nimatron).
Nim is quite in complex as in to know all procedures and types which are generated via macros you basically have to implement an interpreter and the majority of the language rules.
You can play tricks though and apply heuristics. In fact, I rely quite a bit on "Tabnine" these days and its completion suggestions can be amazing, far better than what you can do with the traditional type-precise mechanisms. The power of AI. Of course, in an ideal world you would combine AI with a type-precise analysis.
the Nim installation for VS-CODE is no longer offered
the only alternative is to go to https://marketplace.visualstudio.com/items?itemName=kosz78.nim
download and load in vs-code
Yuck, yet another bloated fat monstrosity.
There's a joke to be had here... :D
I assume you're talking about Jetbrains IDEs here? It's not really clear. Regardless, not the place for the endless IDE vs editor debate.
Millions of developers use Jetbrains products. They now have some support for Nim.
Despite any personal opinions, better editor/IDE support is a net win for the language.
I assume you're talking about Jetbrains IDEs here?
I've used or seen a few IDEs, and IntelliJ's Idea feels perfectly competent on every machine I've used, including a rather old Gateway where Android Studio runs slow as molasses, when it runs at all. I've often wondered how Google could take something as elegant and polished as Idea and turn it into Android Studio, a virtually unusable pile of garbage: a slow, clunky memory hog that breaks every time it updates. Every blessed time! Whereas Idea's updates run smoothly every time. Maybe I've just been lucky with one and unlucky with t'other, but this experience holds up across more than one machine.
Millions of developers use Jetbrains products. They now have some support for Nim.
Note that I started by saying "Thanks". First.
... endless IDE vs editor debate.
That wasn't my point. My point was that we lack reasonably sized editor support. In fact, I'm not against IDEs. Ich think we need both, IDE and reasonably sized editor support.
For anyone wondering - the developer is actively working on the plugin (e.g. he fixed the issue with discard that I reported in less than a day). It has no real autocompletion or go to definition right now, but you can add it yourself!
You can install https://plugins.jetbrains.com/plugin/10209-lsp-support and make it use https://github.com/PMunch/nimlsp (provided you installed it via nimble) with settings:
The plugin seems to get the inclusion context of a file, so for example in the compiler itself you can go to ccgreset.nim line 73, go-to definition on getUniqueType and it'll bring you to ccgutils.nim because it is imported in cgen.nim (that's where ccgreset is included)
Nimsuggest is still not supported, but the plugin manages to do a good job at go-to definition and autocompletion. Another notable feature that is not (yet) supported is method call syntax - the plugin doesn't recognize b in a.b().
Looks like the developer has continued the development and has updated the plugin to work on newest versions of IDEA (from reviews):
Devon, thanks for feedback and sorry for the problems. I haven't tested the plugin with recently released Nim 2.0 yet. I will ensure that everything works fine and nothing hangs. You can expect a much more frequent releases now, as I am back to maintaining the plugin.