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

feat: lake exe function (#76) #77

Closed

Conversation

quinn-dougherty
Copy link

Inspired by lsp-rust-analyzer-run, lean4-lake-exe parses out executable names from lakefile.lean and runs them in their dedicated buffer.

@quinn-dougherty quinn-dougherty force-pushed the master branch 2 times, most recently from 46a21ec to 537758e Compare August 19, 2024 17:24
Inspired by `lsp-rust-analyzer-run`, `lean4-lake-exe` parses out
executable names from `lakefile.lean` and runs them in their dedicated
buffer.

handles guillemonts, regular quotes, and unquoted executable names
@quinn-dougherty
Copy link
Author

it's come to my attention that unquoted executable names are legal in lakefile, and i've struggled with getting them right a little. converted to draft till i figure that out.

additionally: if anyone thinks i shouldn't dump this whole diff into the lean4-lake.el file, let me know, happy to do something else!

@mekeor
Copy link
Collaborator

mekeor commented Dec 2, 2024

Thanks for your interest in contribution and for the interesting idea. Unfortunately, I'm not convinced of the approach to use regular expressions to extract the executable names. Especially now that Lake uses TOML by default and lakefile.lean is dedicated towards more experienced users.

I think it'd be best if Lake itself offered a command like lake list-executables that would output the executable names in a suitable format. We could then use its output from Emacs.

@mekeor
Copy link
Collaborator

mekeor commented Dec 2, 2024

I'd like to close this PR due to the lack of a feasibly globally valid approach to determine the executable names. If you are very motivated, I suggest you contribute a lake list-executables command or similar to Lake itself first, before revisiting the development of this feature.

@mekeor mekeor mentioned this pull request Dec 2, 2024
@mekeor mekeor closed this Dec 2, 2024
@mekeor
Copy link
Collaborator

mekeor commented Dec 2, 2024

Feel free to reopen if you disagree.

@quinn-dougherty
Copy link
Author

indeed-- I started this back when the « ticks were default in the lakefile.lean, and before I realized toml was an option / before they made toml default. I agree with your thoughts! thanks a ton btw for coming in and attending the issues, I super appreciate it.

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