Browse code
chore(emacs): add scala-mode and window management command
Showing 1 changed files
... | ... |
@@ -67,6 +67,9 @@ |
67 | 67 |
(use-package jeison |
68 | 68 |
:ensure t) |
69 | 69 |
|
70 |
+(use-package scala-mode |
|
71 |
+ :ensure t) |
|
72 |
+ |
|
70 | 73 |
(use-package lsp-mode |
71 | 74 |
:pin "melpa-stable" |
72 | 75 |
:ensure t |
... | ... |
@@ -642,3 +645,23 @@ With a prefix ARG invalidates the cache first." |
642 | 645 |
org-brain-title-max-length 12)) |
643 | 646 |
|
644 | 647 |
(setq diary-file (expand-file-name "~/bucket/diary")) |
648 |
+ |
|
649 |
+(cl-defmacro fwoar/binding (setter target &body bindings) |
|
650 |
+ (declare (indent 2)) |
|
651 |
+ (let ((target-sym (gensym))) |
|
652 |
+ `(let ((,target-sym ,target)) |
|
653 |
+ ,(cons 'progn |
|
654 |
+ (mapcar (lambda (binding) |
|
655 |
+ `(,setter ,target-sym ',(car binding) ,@(cdr binding))) |
|
656 |
+ bindings))))) |
|
657 |
+ |
|
658 |
+(defun make-info-window () |
|
659 |
+ (setq mode-line-format nil) |
|
660 |
+ (centaur-tabs-local-mode 1) |
|
661 |
+ (set-window-dedicated-p (selected-window) t) |
|
662 |
+ (when-let (w (window-in-direction 'above)) |
|
663 |
+ (set-window-parameter w 'no-delete-other-windows t)) |
|
664 |
+ (fwoar/binding set-window-parameter (selected-window) |
|
665 |
+ (no-other-window t) |
|
666 |
+ (no-delete-other-windows t)) |
|
667 |
+ ()) |