julienxx / dotnet.el Goto Github PK
View Code? Open in Web Editor NEWdotnet CLI minor mode for Emacs
License: GNU General Public License v3.0
dotnet CLI minor mode for Emacs
License: GNU General Public License v3.0
M-x dotnet-with-args
Receive an interactive prompt to input arguments, then run dotnet app.
Receive error message in minibuffer: Invalid control letter โAโ (#o101, #x0041) in interactive calling string
One line fix inside dotnet-run-with-args
:
(interactive "sArguments: ")
According to Emacs Wiki:
Example of a command that reads a string argument:
(defun hello (someone) "Say hello to SOMEONE via M-x hello." (interactive "sWho do you want to say hello to? ") (message "Hello %s!" someone))
I can submit a PR --I've been using this in my local env already --but wanted to make sure this is the intended behavior first.
I'm wondering if it may be useful to add a shortcut to call dotnet watch run
or dotnet watch test
to have the build refresh on code changes. I anticipate it would behave just like the current prefix e
but would refresh when a file is saved and changed.
Right now if dotnet-build fails, it doesn't highlight errors.
If I manually invoke M-x compile and use "dotnet build" as the command I get the links to the code.
I think it would be better if C-n t
asked which tests to run the first time and from there on acted like C-n T
.
And if you want to run a different test command, then you can get queried again with C-n T
.
It feels more natural/emacsy.
Another option which is even more Emacs-like would be to have C-n t
query the first time, then re-run, and use a prefix arg to get queried again. C-u C-n t
would make you provide the project again.
If you agree with the suggestion, I can provide a pull request with either change.
There's nothing wrong with the way it works now, that's why I'm checking for your thoughts before coding anything.
In the last few days I've using dotnet in a multi-project repo.
I've found myself using the prefix args submitted in my last pull request. Also in my local dotnet.el I added more variables to keep track of the last project for build
, run
, etc. At this rate each function will have it's own variable!!!
I think it would be convenient to have a way to setup a default project so that all commands use it, and allow overrides with C-u
.
Sample workflow:
C-u
prefixI think most commands could share the same default, except dotnet-run
: build, add reference, etc can work on a whole solution but you usually run only one project within the solution directories.
So in essence we would need 2 variables to track the "current project".
I also think it would be great to show the current projects in the echo area when the dotnet-mode keymap is active, if possible, so you know that you need to add an arg to your call.
This adds some complexity to the package, though, and changes it's behaviour quite a bit. So unless you see an use for these changes yourself, I can keep these in my own branch (when I get around to making them hehe)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.