Hello to all
I have just installed NimPlus --as per github instructions-- within Sublime Text 4.
At this point I have to say that I have installed nim using ChooseNim -in a Linux system (in fact, after a fresh installation.
When I try to compile/run a source nim file (e.g., test.nim, which contains just an echo) I get:
[Errno 2] No such file or directory: 'nim'
[cmd: ['nim', 'r', '/home/$USER/Nim_LP/test.nim']]
[dir: /home/$USER/Nim_LP]
[path: /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin]
[Finished]
Any ideas? By the way, using terminal, i.e.,
$ nim c -r test.nim
everything is OK.
Thank you.
You need to add Nim to your PATH globally (not in .bashrc/.zshrc). Add this line to the ~/.profile:
export PATH="$HOME/.nimble/bin:$PATH
then logout or reboot.
That should work for Ubuntu/Debian/Arch-based distros. For OpenSUSE - instead, edit file '/etc/profile.local'
Don't quote me on that, but as I understand: you previously added '~/.nimble/bin' to your PATH in some config file for fish shell (e.g. '.fishrc').
This file is sourced (loaded) when you start a shell session or launch a gui program from terminal. So, when a program is started not from a terminal, it doesn't source this file, thus it sees the default unmodified PATH.
"~/.profile" is instead sourced at startup by your system, so it should affect all programs regardless of where you launching them from.