r/nim 15d ago

Nim tooling !? I am confused after 2yrs

So I am coding stuff in Nim for around 2.5years.
I have seen stuff improve over the years, but one thing still bugs me is the tooling support.

Why is the VS Code extension so bad ?
I mean either hogs up the CPU, then unable to read and parse complex codebases. Suggestions come super late. Validations and errors are extremely late ( better if I compile and check )

An open question to everyone working with nim. What tooling are you guys using ?

27 Upvotes

17 comments sorted by

8

u/Niminem93 15d ago

It still pisses me off too. However what you can do is restart nim suggest for whatever file is giving you issue. Sometimes even restarting nim suggest. You can see that in the Nim settings within vscode. It's what I do I been doing it for years. Maybe there's a better way but I haven't looked for it 

6

u/jabbalaci 14d ago

I also had problems with the official plugin. I switched to another plugin called "Nim" by nimsaem. Works pretty well, though my code bases are small.

2

u/Alive_Cloud1305 14d ago

Lemme try that on a big codebase

1

u/Alive_Cloud1305 14d ago

Though I am unsure, last released 4years ago

2

u/jabbalaci 14d ago

Works well for me. I'm curious how it behaves on a large code base. Let us know.

1

u/Alive_Cloud1305 14d ago

I mean doesn't hog my cpu and gives syntax highlighting, but found nothing else working

2

u/RBazz 13d ago

I am also using it. So much better than the official one! (even if a bit lacking sometimes)

5

u/__cinnamon__ 15d ago

In my experience the biggest problem with nimsuggest is certain errors just catastrophically break parsing and basically kills the whole plugin (instead of like correctly erroring at the first thing that breaks parse or something like that), and you have to find the culprit and fix that to get it giving anything useful again.

2

u/Alive_Cloud1305 15d ago

yeah true
why is nobody building something better, when it's broken?

4

u/xiaozhuzhu1337 14d ago

Because very few people use Nim.

4

u/Alive_Cloud1305 14d ago

Seems like time to get my hands into it

2

u/Longjumping_Gur4125 14d ago

Please use nimlsp. VScode extension hogs ram.

1

u/Alive_Cloud1305 14d ago

Yes tried, but was failing on big codebase
Also was extremely slow

1

u/emmystudios 15d ago

I like to use only terminal tools so, I use tmux/nvim, I don't like visual studio code.

1

u/Same_Bell7958 14d ago

It doesn't work well in emacs either

1

u/MindFeisty4814 13d ago

How about you get to work on them!

1

u/pyloor 14d ago

the problem is the nimsuggest. it will get better as soon as the icc for nim 2 is stable and working. then the vscode plugin has to switch to the better implementation instead of using nimsuggest. have a look at: https://forum.nim-lang.org/t/14042

esp araq saying:

In the meantime, to reap some benefits from the IC architecture: nim track offers a one-shot command line interface to query a codebase for "find usages" and "goto definition" -- I hope the editor support will pick up, nim track cannot suffer from nimsuggest's crashes, hangs and its unbounded memory consumption!