Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add very basic nimble support #230

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

mcbloch
Copy link

@mcbloch mcbloch commented Aug 21, 2020

No description provided.

@mcbloch
Copy link
Author

mcbloch commented Aug 21, 2020

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.

@krux02
Copy link
Contributor

krux02 commented Aug 23, 2020

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.

@mcbloch
Copy link
Author

mcbloch commented Aug 24, 2020

There is

  • nimble c # compile
  • nimble build # build the package with default flags
  • nimble run # build and run any binary specified in your package's bin list

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants