improve lisp experience
- define bigger window heights and organize placement of repl and magit windows - add run-tests method to aoc template - map copilot-expand to C-S-y
This commit is contained in:
parent
8adf66a7fe
commit
aee411ac47
2 changed files with 54 additions and 36 deletions
85
init.org
85
init.org
|
@ -810,7 +810,6 @@ See the excellent documentation on [[https://github.com/minad/consult][Minad's c
|
|||
#+RESULTS:
|
||||
: [nil 26284 54919 318035 nil elpaca-process-queues nil nil 339000 nil]
|
||||
|
||||
|
||||
** User Interface
|
||||
*** Display startup time
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -970,8 +969,20 @@ There is a keybinding on *<F5>* to toggle between light and dark mode.
|
|||
;; Parameters
|
||||
(window-height . 10))
|
||||
display-buffer-alist)
|
||||
|
||||
;; set custom info folder
|
||||
(push '("magit:.*"
|
||||
;; display-buffer functions, first one that succeeds is used
|
||||
(display-buffer-reuse-mode-window
|
||||
display-buffer-below-selected)
|
||||
;; Parameters
|
||||
(window-height . 10))
|
||||
display-buffer-alist)
|
||||
(push '("\\*sly-mrepl for .*\\*"
|
||||
;; display-buffer functions, first one that succeeds is used
|
||||
(display-buffer-reuse-mode-window
|
||||
display-buffer-below-selected)
|
||||
;; Parameters
|
||||
(window-height . 10))
|
||||
display-buffer-alist)
|
||||
(add-to-list 'Info-default-directory-list "~/.local/share/info/")
|
||||
#+END_SRC
|
||||
|
||||
|
@ -1152,7 +1163,6 @@ This enables direnv globally.
|
|||
#+RESULTS:
|
||||
: [nil 26432 30485 62583 nil elpaca-process-queues nil nil 114000 nil]
|
||||
|
||||
|
||||
** Enable breadcrumbs
|
||||
|
||||
Show breadcrumbs in the header line to keep context of the file being
|
||||
|
@ -1949,24 +1959,26 @@ Map the keymap consistently to the eglot mappings.
|
|||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package copilot
|
||||
:ensure (:host github :repo "zerolfx/copilot.el"
|
||||
:branch "main"
|
||||
:files ("dist" "*.el"))
|
||||
:bind
|
||||
(:map evil-insert-state-map
|
||||
("C-y" . copilot-accept-completion))
|
||||
:config
|
||||
(add-to-list 'copilot-indentation-alist '(scheme-mode . 2))
|
||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode . 2))
|
||||
(add-to-list 'copilot-indentation-alist '(lisp-mode . 2))
|
||||
:hook
|
||||
(prog-mode . copilot-mode)
|
||||
(org-mode . copilot-mode))
|
||||
(use-package copilot
|
||||
:ensure (:host github :repo "zerolfx/copilot.el"
|
||||
:branch "main"
|
||||
:files ("dist" "*.el"))
|
||||
:bind
|
||||
(:map evil-insert-state-map
|
||||
("C-S-y" . copilot-accept-completion))
|
||||
:config
|
||||
(add-to-list 'copilot-indentation-alist '(scheme-mode . 2))
|
||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode . 2))
|
||||
(add-to-list 'copilot-indentation-alist '(lisp-mode . 2))
|
||||
(set-option 'copilot-indent-offset-warning-disabled t)
|
||||
|
||||
:hook
|
||||
(prog-mode . copilot-mode)
|
||||
(org-mode . copilot-mode))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26280 62042 380168 nil elpaca-process-queues nil nil 930000 nil]
|
||||
: [nil 26466 40154 497697 nil elpaca-process-queues nil nil 528000 nil]
|
||||
|
||||
*** TODO move scheme configuration to the scheme section
|
||||
or leave it here but move it to config, whatever makes most sense at
|
||||
|
@ -2007,7 +2019,6 @@ templates to be generated. By default it uses
|
|||
#+RESULTS:
|
||||
: [nil 26455 5250 886750 nil elpaca-process-queues nil nil 641000 nil]
|
||||
|
||||
|
||||
* Writing and Planning
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -2180,24 +2191,26 @@ interactive to manually install the latest version if needed.
|
|||
|
||||
**** Configure Babel Languages
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; configure babel languages
|
||||
(use-package org-babel
|
||||
:no-require
|
||||
:after '(ob-verb ob-mermaid)
|
||||
:config
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((emacs-lisp . t)
|
||||
(shell . t)
|
||||
(python . t)
|
||||
(latex . t)
|
||||
(verb . t)
|
||||
(scheme . t)
|
||||
(plantuml . t)
|
||||
(mermaid . t)
|
||||
(dot . t))))
|
||||
;; configure babel languages
|
||||
(use-package org-babel
|
||||
:no-require
|
||||
:after '(ob-verb ob-mermaid)
|
||||
:config
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((emacs-lisp . t)
|
||||
(shell . t)
|
||||
(python . t)
|
||||
(latex . t)
|
||||
(verb . t)
|
||||
(scheme . t)
|
||||
(plantuml . t)
|
||||
(mermaid . t)
|
||||
(dot . t))))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
**** Temporary Patches for Org Babel
|
||||
|
||||
***** Fix Scheme Babel Bug
|
||||
|
|
|
@ -106,5 +106,10 @@ written in lower case. The code looks for these case sensitively.
|
|||
(define-test+run test-part2
|
||||
:parent suite-2024-{{day}}
|
||||
(is equal nil (part2 sample-data)))
|
||||
|
||||
|
||||
(defun run-tests ()
|
||||
(run-test-suite 'suite-2024-{{day}}))
|
||||
|
||||
#+end_src
|
||||
|
||||
|
|
Loading…
Reference in a new issue