[dotnet] Change bindings to be based on p for project

as d is reserved for debuger integrations. Also make
sure that dotnet bindings are set for fsharp and csharp.
Fixes #14606
This commit is contained in:
Maximilian Wolff 2021-06-16 22:47:11 +02:00
parent 4039ad5852
commit ab6b165e96
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
2 changed files with 36 additions and 36 deletions

View File

@ -13,10 +13,7 @@
This layer adds support for the dotnet cli package.
** Features:
- dotnet operations
* Packages Included
- [[https://github.com/julienXX/dotnet.el][dotnet]]
- dotnet project operations
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
@ -27,16 +24,16 @@ file.
| Key binding | Description |
|---------------+-----------------------------------------------|
| ~SPC m d a p~ | Add package to the current dotnet project |
| ~SPC m d a r~ | Add reference to the current dotnet project |
| ~SPC m d b~ | Build the current dotnet project |
| ~SPC m d c~ | Clean the current dotnet project |
| ~SPC m d n~ | Create a new dotnet project |
| ~SPC m d p~ | Publish the current dotnet project |
| ~SPC m d r a~ | Run the current dotnet project with arguments |
| ~SPC m d r r~ | Restore the current dotnet project |
| ~SPC m d s a~ | Add to the current dotnet solution |
| ~SPC m d s l~ | List the current dotnet solution |
| ~SPC m d s n~ | Create a new dotnet solution |
| ~SPC m d s r~ | Remove from the current dotnet solution |
| ~SPC m d t~ | Run tests for the current dotnet project |
| ~SPC m p a p~ | Add package to the current dotnet project |
| ~SPC m p a r~ | Add reference to the current dotnet project |
| ~SPC m p b~ | Build the current dotnet project |
| ~SPC m p c~ | Clean the current dotnet project |
| ~SPC m p n~ | Create a new dotnet project |
| ~SPC m p p~ | Publish the current dotnet project |
| ~SPC m p r a~ | Run the current dotnet project with arguments |
| ~SPC m p r r~ | Restore the current dotnet project |
| ~SPC m p s a~ | Add to the current dotnet solution |
| ~SPC m p s l~ | List the current dotnet solution |
| ~SPC m p s n~ | Create a new dotnet solution |
| ~SPC m p s r~ | Remove from the current dotnet solution |
| ~SPC m p t~ | Run tests for the current dotnet project |

View File

@ -19,27 +19,30 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq dotnet-packages
'(
dotnet
))
(defconst dotnet-packages
'(dotnet))
(defun dotnet/init-dotnet ()
(use-package dotnet
:defer t
:init
(spacemacs/set-leader-keys-for-major-mode 'fsharp-mode
"dap" 'dotnet-add-package
"dar" 'dotnet-add-reference
"db" 'dotnet-build
"dc" 'dotnet-clean
"dn" 'dotnet-new
"dp" 'dotnet-publish
"dra" 'dotnet-run-with-args
"drr" 'dotnet-run
"drs" 'dotnet-restore
"dsa" 'dotnet-sln-add
"dsl" 'dotnet-sln-list
"dsn" 'dotnet-sln-new
"dsr" 'dotnet-sln-remove
"dt" 'dotnet-test)))
(dolist (mode '(fsharp-mode csharp-mode))
(spacemacs/declare-prefix-for-mode mode "mp" "project")
(spacemacs/declare-prefix-for-mode mode "mpa" "add")
(spacemacs/declare-prefix-for-mode mode "mpr" "run")
(spacemacs/declare-prefix-for-mode mode "mps" "sln")
(spacemacs/set-leader-keys-for-major-mode mode
"pap" 'dotnet-add-package
"par" 'dotnet-add-reference
"pb" 'dotnet-build
"pc" 'dotnet-clean
"pn" 'dotnet-new
"pp" 'dotnet-publish
"pra" 'dotnet-run-with-args
"prr" 'dotnet-run
"prs" 'dotnet-restore
"psa" 'dotnet-sln-add
"psl" 'dotnet-sln-list
"psn" 'dotnet-sln-new
"psr" 'dotnet-sln-remove
"pt" 'dotnet-test))))