I often end up with imports I don't need as my code evolves. Is there any way to make nim tell me which ones are redundant?


2017-03-15 09:40:26
Right now the compiler doesn't track it and so it cannot report it either. All you can do is to remove the import manually and see if it still compiles. (Which is easy when you use an editor with nimsuggest support.) 2017-03-15 10:27:51

Off topic a bit, but is there a list of editors that support nimsuggest?

I tried it in "Atom" editor and nimsuggest plugin constantly throws random exceptions at me.

2017-03-15 10:42:33
I am using Visual Studio Code. It is working fine. https://forum.nim-lang.org/t/2061
2017-03-15 11:32:50
Yes I heared a lot of good feedback for Visual Studio Code users. Emacs works, too (that's what I use). 2017-03-15 11:58:37
I've tried Atom and Sublime and found them both to be pretty good, but I'll add another vote for VS Code - it is by far my favorite of the three. 2017-03-15 14:12:36
Sorry for highjacking your post.
@All the others:
Yes I know there are editors for nim, but my question is about editors with nimsuggest support. As far as I can tell VS Code does not support it. Atom is the only one that does, sort of.
2017-03-15 17:45:59

As far as I can tell VS Code does not support it.

It does.

2017-03-15 17:48:49

@xyz32: I had a few problems with making nimsuggest work on macOS with VSCode. I ended up compyling nim from sources, then adding /path/to/Nim/sources/bin to my $PATH.

FYI: previously I had Nim installed from brew and it couldn't find the binary (possibly because of problems resolving symlinks)

2017-03-17 11:34:31