Compare commits
No commits in common. "baf34a00e91cc217654fa2859b9620aa00d8f77a" and "ce43480bb58c61fd90de4a94b414833779b8b554" have entirely different histories.
baf34a00e9
...
ce43480bb5
@ -1740,7 +1740,6 @@ A function to kill all buffers except the current one from [[https://www.emacswi
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(leader-def-key "!" 'shell-command)
|
(leader-def-key "!" 'shell-command)
|
||||||
(leader-def-key "|" 'shell-command-on-region)
|
(leader-def-key "|" 'shell-command-on-region)
|
||||||
(general-def 'normal shell-mode-map "q" #'bury-buffer)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Toggles
|
** Toggles
|
||||||
@ -6513,11 +6512,6 @@ current buffer:
|
|||||||
(use-package run-command
|
(use-package run-command
|
||||||
:straight (run-command :host github :repo "bard/emacs-run-command"
|
:straight (run-command :host github :repo "bard/emacs-run-command"
|
||||||
:fork (:host github :repo "jdormit/emacs-run-command" :branch "master"))
|
:fork (:host github :repo "jdormit/emacs-run-command" :branch "master"))
|
||||||
:init
|
|
||||||
(defvar-local run-command-local-commands nil)
|
|
||||||
(put 'run-command-local-commands 'safe-local-variable (lambda (_) t))
|
|
||||||
(defvar-local run-command-project-local-commands nil)
|
|
||||||
(put 'run-command-project-local-commands 'safe-local-variable (lambda (_) t))
|
|
||||||
:config
|
:config
|
||||||
(defun run-command-recipe-terraform ()
|
(defun run-command-recipe-terraform ()
|
||||||
(when (directory-files default-directory
|
(when (directory-files default-directory
|
||||||
@ -6535,6 +6529,9 @@ current buffer:
|
|||||||
(list :command-name "destroy"
|
(list :command-name "destroy"
|
||||||
:command-line "terraform destroy"))))
|
:command-line "terraform destroy"))))
|
||||||
|
|
||||||
|
(defvar-local run-command-local-commands nil)
|
||||||
|
(put 'run-command-local-commands 'safe-local-variable (lambda (_) t))
|
||||||
|
|
||||||
(defun run-command-recipe-local ()
|
(defun run-command-recipe-local ()
|
||||||
(when run-command-local-commands
|
(when run-command-local-commands
|
||||||
(mapcar (cl-function
|
(mapcar (cl-function
|
||||||
@ -6603,6 +6600,9 @@ current buffer:
|
|||||||
:working-dir (projectile-compilation-dir))))
|
:working-dir (projectile-compilation-dir))))
|
||||||
'("test" "run" "compilation" "configure" "install" "package"))))
|
'("test" "run" "compilation" "configure" "install" "package"))))
|
||||||
|
|
||||||
|
(defvar-local run-command-project-local-commands nil)
|
||||||
|
(put 'run-command-project-local-commands 'safe-local-variable (lambda (_) t))
|
||||||
|
|
||||||
(defun run-command-recipe-project-local ()
|
(defun run-command-recipe-project-local ()
|
||||||
(when (and run-command-project-local-commands (projectile-project-root))
|
(when (and run-command-project-local-commands (projectile-project-root))
|
||||||
(mapcar (cl-function
|
(mapcar (cl-function
|
||||||
@ -6657,29 +6657,6 @@ current buffer:
|
|||||||
(list :command-name "edit"
|
(list :command-name "edit"
|
||||||
:command-line (format "sops %s" (buffer-file-name))))))
|
:command-line (format "sops %s" (buffer-file-name))))))
|
||||||
|
|
||||||
(defun run-command-recipe-pytest ()
|
|
||||||
(when (and (derived-mode-p 'python-mode)
|
|
||||||
(= 0 (call-process "python" nil nil nil "-c" "import pytest")))
|
|
||||||
(let ((test-file-p (string-match-p "test" (or (buffer-file-name) ""))))
|
|
||||||
(list
|
|
||||||
(when (and (projectile-project-root)
|
|
||||||
(file-exists-p (concat (file-name-as-directory (projectile-project-root))
|
|
||||||
"tests")))
|
|
||||||
(list :command-name "test all"
|
|
||||||
:command-line "pytest tests"
|
|
||||||
:working-dir (projectile-project-root)))
|
|
||||||
(when test-file-p
|
|
||||||
(list :command-name "test this file"
|
|
||||||
:command-line (format "pytest %s" (buffer-file-name))))
|
|
||||||
(when (and test-file-p (python-info-current-defun))
|
|
||||||
(list :command-name "test this function"
|
|
||||||
:command-line (format "pytest %s::%s"
|
|
||||||
(buffer-file-name)
|
|
||||||
(replace-regexp-in-string
|
|
||||||
"\\."
|
|
||||||
"::"
|
|
||||||
(python-info-current-defun)))))))))
|
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(leader-map "\"" #'run-command)
|
(leader-map "\"" #'run-command)
|
||||||
(run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile)
|
(run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile)
|
||||||
@ -6694,8 +6671,7 @@ current buffer:
|
|||||||
run-command-recipe-executables
|
run-command-recipe-executables
|
||||||
run-command-recipe-obelix
|
run-command-recipe-obelix
|
||||||
run-command-recipe-kustomize
|
run-command-recipe-kustomize
|
||||||
run-command-recipe-sops
|
run-command-recipe-sops)))
|
||||||
run-command-recipe-pytest)))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user