adding justl
This commit is contained in:
		
							parent
							
								
									323a620ed7
								
							
						
					
					
						commit
						dda390450e
					
				
					 2 changed files with 47 additions and 2 deletions
				
			
		
							
								
								
									
										26
									
								
								README.org
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								README.org
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3691,6 +3691,9 @@ Let's make sure docker is capable of using tramp.
 | 
			
		|||
 | 
			
		||||
Still need  dockerfile-mode in order to be able to edit dockerfiles.
 | 
			
		||||
*** Just
 | 
			
		||||
:PROPERTIES:
 | 
			
		||||
:ID:       20240705T095129.209161
 | 
			
		||||
:END:
 | 
			
		||||
Let's use just-mode
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(use-package just-mode
 | 
			
		||||
| 
						 | 
				
			
			@ -3698,7 +3701,28 @@ Let's use just-mode
 | 
			
		|||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(use-package justl)
 | 
			
		||||
(use-package justl
 | 
			
		||||
  :config
 | 
			
		||||
  (defun chris/justl-exec-recipe ()
 | 
			
		||||
      "Execute a recipe in the justfile from the minibuffer"
 | 
			
		||||
    (interactive)
 | 
			
		||||
    (let* ((justfile (justl--find-justfile (project-root (eglot--current-project))))
 | 
			
		||||
           (recipes (cl-loop for recipe in (justl--get-recipes justfile)
 | 
			
		||||
                             collect (cdr (assoc 'name recipe))))
 | 
			
		||||
           (recipe (completing-read "Which recipe to run: " recipes)))
 | 
			
		||||
      (if (get-buffer "*just*")
 | 
			
		||||
        (justl--exec "just1" recipe `(,recipe))
 | 
			
		||||
        (justl--exec justl-executable recipe `(,recipe)))
 | 
			
		||||
      (message "%s" recipe)))
 | 
			
		||||
  :general
 | 
			
		||||
  (general-def 'normal justl-mode-map
 | 
			
		||||
    "e" 'justl-exec-recipe
 | 
			
		||||
    "E" 'justl-exec-eshell
 | 
			
		||||
    "<return>" 'justl-exec-recipe)
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
    :states 'normal
 | 
			
		||||
    :keymaps 'rustic-mode-map
 | 
			
		||||
    "gj" 'chris/justl-exec-recipe))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** Fish
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										23
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										23
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2708,7 +2708,28 @@ targets."
 | 
			
		|||
(use-package just-mode
 | 
			
		||||
  :mode ("\\.just\\'" . just-mode))
 | 
			
		||||
 | 
			
		||||
(use-package justl)
 | 
			
		||||
(use-package justl
 | 
			
		||||
  :config
 | 
			
		||||
  (defun chris/justl-exec-recipe ()
 | 
			
		||||
      "Execute a recipe in the justfile from the minibuffer"
 | 
			
		||||
    (interactive)
 | 
			
		||||
    (let* ((justfile (justl--find-justfile (project-root (eglot--current-project))))
 | 
			
		||||
           (recipes (cl-loop for recipe in (justl--get-recipes justfile)
 | 
			
		||||
                             collect (cdr (assoc 'name recipe))))
 | 
			
		||||
           (recipe (completing-read "Which recipe to run: " recipes)))
 | 
			
		||||
      (if (get-buffer "*just*")
 | 
			
		||||
        (justl--exec "just1" recipe `(,recipe))
 | 
			
		||||
        (justl--exec justl-executable recipe `(,recipe)))
 | 
			
		||||
      (message "%s" recipe)))
 | 
			
		||||
  :general
 | 
			
		||||
  (general-def 'normal justl-mode-map
 | 
			
		||||
    "e" 'justl-exec-recipe
 | 
			
		||||
    "E" 'justl-exec-eshell
 | 
			
		||||
    "<return>" 'justl-exec-recipe)
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
    :states 'normal
 | 
			
		||||
    :keymaps 'rustic-mode-map
 | 
			
		||||
    "gj" 'chris/justl-exec-recipe))
 | 
			
		||||
 | 
			
		||||
(use-package fish-mode
 | 
			
		||||
  :mode ("\\.fish\\'" . fish-mode))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue