Open mcbloch opened 3 years ago
Yes, it was me who introduced nimble to nim-compile--get-compile-command. What it does is, it checks if the project could be a nimble project. If it thinks it is a nimble project, the the default command to compile a file will be nimble
instead of nim
. Since nim-compile--get-compile-command just returns a default when you compile a file for the first time, it should not be that bad, if the guessing goes wrong.
So what do you suggest should nimble integration be solved generally? My personal preference is, just use compile
for everything because it does exactly what I expect it to do, especially with the recompile
command that I bound to <F9>
.
The reason I prefer the compile command over comint
is, it parses error messages and makes them clickable. I know it doesn't allow user input.
There is
I can imagine you want to bind the compile or build command to the default command, but the run command should allow user input (which makes my read-only buffer also not correct). So I would first suggest keeping the run command separate. Secondly you could still bind the compile command in the case of a nimble project to nimble build
.
Do you have time to look at that second case?
I noticed a start on project commands in de
nim-compile
file. That code does not work and is a bit messy still. My emacs-lisp is not good enough to fix that and I preferred adding nimble separately instead of merging it into the main compile command.