Changeset 43feba7 in dotfiles
- Timestamp:
- Sep 17, 2022, 11:51:27 PM (2 years ago)
- Branches:
- master
- Children:
- 7c5cbf8
- Parents:
- 3a705ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/.emacs.d/.emacs-config.org
r3a705ab r43feba7 101 101 менеджер. Я использую Guix для большей части взаимодействий со сторонним 102 102 кодом. 103 #+begin_src elisp :tangle init.el103 #+begin_src elisp :tangle nil 104 104 (require 'package) 105 105 (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) … … 541 541 Использую встроенный Flymake и Flycheck 542 542 *** Flymake 543 #+BEGIN_SRC emacs-lisp :tangle init.el543 #+BEGIN_SRC emacs-lisp :tangle nil 544 544 ;;(add-hook 'prog-mode-hook 'flymake-mode) 545 545 … … 617 617 618 618 ;; Fix for transient to behave like a normal buffer 619 (with-eval-after-load 'transient620 (setq621 transient--buffer-name "*transient*"622 ;; transient-detect-key-conflicts t623 ;; transient-highlight-mismatched-keys t624 ;; transient--debug t625 transient-enable-popup-navigation t626 transient-mode-line-format mode-line-format627 transient-display-buffer-action '(display-buffer-below-selected))628 629 (let ((map transient-base-map))630 (define-key map (kbd "C-g") 'transient-quit-all)631 (define-key map (kbd "C-q") 'transient-quit-one)632 (define-key map (kbd "DEL") 'transient-quit-one))633 634 (define-key transient-map (kbd "C-h") nil)635 636 (let ((map transient-popup-navigation-map))637 (define-key map (kbd "<tab>") 'transient-forward-button)638 (define-key map (kbd "<backtab>") 'transient-backward-button ))639 640 (transient-suffix-put 'transient-common-commands641 642 (transient-suffix-put 'transient-common-commands643 644 645 (defun al/transient-fix-window ()646 "Return `transient--window' to a 'normal' state."647 (set-window-dedicated-p transient--window nil)648 (set-window-parameter transient--window 'no-other-window nil)649 (with-selected-window transient--window650 651 652 653 654 655 656 657 658 659 (define-derived-mode al/transient-mode special-mode "al/transient"660 (setq buffer-read-only nil)661 (al/transient-fix-window))662 663 (defun al/transient-push-keymap (map)664 (with-demoted-errors "al/transient-push-keymap: %S"665 666 667 (defun al/transient-pop-keymap (map)668 (with-demoted-errors "al/transient-pop-keymap: %S"669 670 671 (defun al/transient-fix-show (&rest _)672 (transient--debug 'al/transient-fix-show)673 (al/transient-fix-window)674 (select-window transient--window))675 676 (defun al/transient-fix-init (&rest _)677 (transient--debug 'al/transient-fix-init)678 (with-current-buffer transient--buffer-name679 680 681 (defun al/transient-fix-pre/post-command (fun &rest args)682 (transient--debug 'al/transient-fix-pre/post-command)683 ;; Do anything only for transient commands.684 (when (or (get this-command 'transient--prefix)685 686 687 688 689 690 691 692 693 (defun al/transient-fix-delete-window (fun &rest args)694 (unless (eq transient--exitp 'suspend)695 696 697 (advice-add 'transient--minibuffer-setup :override #'ignore)698 (advice-add 'transient--minibuffer-exit :override #'ignore)699 (advice-add 'transient--push-keymap :override #'al/transient-push-keymap)700 (advice-add 'transient--pop-keymap :override #'al/transient-pop-keymap)701 (advice-add 'transient--pre-command :around #'al/transient-fix-pre/post-command)702 (advice-add 'transient--post-command :around #'al/transient-fix-pre/post-command)703 (advice-add 'transient--show :after #'al/transient-fix-show)704 (advice-add 'transient--init-transient :after #'al/transient-fix-init)705 (advice-add 'transient--delete-window :around #'al/transient-fix-delete-window))619 ;; (with-eval-after-load 'transient 620 ;; (setq 621 ;; transient--buffer-name "*transient*" 622 ;; ;; transient-detect-key-conflicts t 623 ;; ;; transient-highlight-mismatched-keys t 624 ;; ;; transient--debug t 625 ;; transient-enable-popup-navigation t 626 ;; transient-mode-line-format mode-line-format 627 ;; transient-display-buffer-action '(display-buffer-below-selected)) 628 629 ;; (let ((map transient-base-map)) 630 ;; (define-key map (kbd "C-g") 'transient-quit-all) 631 ;; (define-key map (kbd "C-q") 'transient-quit-one) 632 ;; (define-key map (kbd "DEL") 'transient-quit-one)) 633 634 ;; (define-key transient-map (kbd "C-h") nil) 635 636 ;; (let ((map transient-popup-navigation-map)) 637 ;; (define-key map (kbd "<tab>") 'transient-forward-button) 638 ;; (define-key map (kbd "<backtab>") 'transient-backward-button )) 639 640 ;; (transient-suffix-put 'transient-common-commands 641 ;; "C-g" :command 'transient-quit-all) 642 ;; (transient-suffix-put 'transient-common-commands 643 ;; "C-q" :command 'transient-quit-one) 644 645 ;; (defun al/transient-fix-window () 646 ;; "Return `transient--window' to a 'normal' state." 647 ;; (set-window-dedicated-p transient--window nil) 648 ;; (set-window-parameter transient--window 'no-other-window nil) 649 ;; (with-selected-window transient--window 650 ;; (setq 651 ;; window-size-fixed nil 652 ;; cursor-in-non-selected-windows t 653 ;; cursor-type (default-value 'cursor-type) 654 ;; mode-line-buffer-identification 655 ;; (list "" 656 ;; (symbol-name (oref transient--prefix command)) 657 ;; " " (default-value 'mode-line-buffer-identification))))) 658 659 ;; (define-derived-mode al/transient-mode special-mode "al/transient" 660 ;; (setq buffer-read-only nil) 661 ;; (al/transient-fix-window)) 662 663 ;; (defun al/transient-push-keymap (map) 664 ;; (with-demoted-errors "al/transient-push-keymap: %S" 665 ;; (internal-push-keymap (symbol-value map) 'al/transient-mode-map))) 666 667 ;; (defun al/transient-pop-keymap (map) 668 ;; (with-demoted-errors "al/transient-pop-keymap: %S" 669 ;; (internal-pop-keymap (symbol-value map) 'al/transient-mode-map))) 670 671 ;; (defun al/transient-fix-show (&rest _) 672 ;; (transient--debug 'al/transient-fix-show) 673 ;; (al/transient-fix-window) 674 ;; (select-window transient--window)) 675 676 ;; (defun al/transient-fix-init (&rest _) 677 ;; (transient--debug 'al/transient-fix-init) 678 ;; (with-current-buffer transient--buffer-name 679 ;; (al/transient-mode))) 680 681 ;; (defun al/transient-fix-pre/post-command (fun &rest args) 682 ;; (transient--debug 'al/transient-fix-pre/post-command) 683 ;; ;; Do anything only for transient commands. 684 ;; (when (or (get this-command 'transient--prefix) 685 ;; (string-match-p "\\`transient" 686 ;; (symbol-name this-command)) 687 ;; (and transient--transient-map 688 ;; (string= (buffer-name) transient--buffer-name) 689 ;; (lookup-key transient--transient-map 690 ;; (this-single-command-raw-keys)))) 691 ;; (apply fun args))) 692 693 ;; (defun al/transient-fix-delete-window (fun &rest args) 694 ;; (unless (eq transient--exitp 'suspend) 695 ;; (apply fun args))) 696 697 ;; (advice-add 'transient--minibuffer-setup :override #'ignore) 698 ;; (advice-add 'transient--minibuffer-exit :override #'ignore) 699 ;; (advice-add 'transient--push-keymap :override #'al/transient-push-keymap) 700 ;; (advice-add 'transient--pop-keymap :override #'al/transient-pop-keymap) 701 ;; (advice-add 'transient--pre-command :around #'al/transient-fix-pre/post-command) 702 ;; (advice-add 'transient--post-command :around #'al/transient-fix-pre/post-command) 703 ;; (advice-add 'transient--show :after #'al/transient-fix-show) 704 ;; (advice-add 'transient--init-transient :after #'al/transient-fix-init) 705 ;; (advice-add 'transient--delete-window :around #'al/transient-fix-delete-window)) 706 706 707 707 ;; Use magit only when built-in VC fails … … 717 717 желтым цветом соответственно. 718 718 719 #+BEGIN_SRC emacs-lisp :tangle init.el719 #+BEGIN_SRC emacs-lisp :tangle nil 720 720 ;;; Show added & removed git lines 721 721 (when (package-loaded? "git-gutter") … … 827 827 ** Дополнение 828 828 ** Дебаггер 829 #+begin_src emacs-lisp :tangle init.el829 #+begin_src emacs-lisp :tangle nil 830 830 (when (package-loaded? "realgud") 831 831 (load "~/.emacs.d/site-lisp/realgud-xdebug/realgud-xdebug.el")) … … 835 835 По большей части я использую дефолтный Completion Buffer и Corfu 836 836 #+begin_src elisp :tangle init.el 837 (require 'corfu)838 (require 'corfu-doc)839 840 837 (when (package-loaded? "corfu") 841 838 (progn 842 839 (setq corfu-preview-current 'nil) 840 (corfu-mode 1) 843 841 (defun show-default-completion-buffer () 844 842 (interactive) … … 849 847 (define-key corfu-map (kbd "M-TAB") 'show-default-completion-buffer) 850 848 (define-key corfu-map (kbd "TAB") 'show-default-completion-buffer) 851 (define-key corfu-map (kbd "C-M-i") 'show-default-completion-buffer) 849 (define-key corfu-map (kbd "C-M-i") 'show-default-completion-buffer) 850 (corfu-mode -1) 852 851 (add-hook 'prog-mode-hook 'corfu-mode))) 853 852 … … 940 939 (when (package-loaded? "undo-tree") 941 940 (progn 942 ( global-undo-tree-mode)941 (add-hook 'prog-mode-hook #'undo-tree-mode) 943 942 (setq undo-tree-auto-save-history nil))) 944 943 #+end_src … … 985 984 986 985 ** Сессия 987 #+BEGIN_SRC emacs-lisp :tangle nil988 (desktop-save-mode nil)986 #+BEGIN_SRC emacs-lisp :tangle init.el 987 (desktop-save-mode 1) 989 988 #+END_SRC 990 989 ** Скроллинг … … 1039 1038 *** REPL 1040 1039 #+BEGIN_SRC emacs-lisp :tangle init.el 1040 (load "slime-autoloads") 1041 1041 (setq slime-contribs '(slime-fancy slime-repl slime-banner)) 1042 1042 #+END_SRC … … 1326 1326 1327 1327 ;; (load "org-roam-ui-autoloads") 1328 (org-roam-db-sync)1328 ;; (org-roam-db-sync) 1329 1329 1330 1330 (org-roam-db-autosync-mode t) … … 1557 1557 1558 1558 ** Tramp 1559 #+begin_src emacs-lisp :tangle init.el1559 #+begin_src emacs-lisp :tangle nil 1560 1560 (add-to-list 'tramp-remote-path 'tramp-own-remote-path) 1561 1561 #+end_src … … 1577 1577 #+begin_src emacs-lisp :tangle init.el 1578 1578 (package-loaded? "geiser-guile") 1579 (require 'geiser-guile)1580 1579 1581 1580 (package-loaded? "guix") … … 1585 1584 (with-eval-after-load 'geiser-guile 1586 1585 (progn 1587 ;; (require 'compile)1588 ;; (let* ((shell-command "guile -c '(write %load-path)'")1589 ;; (shell-output (shell-command-to-string shell-command))1590 ;; (load-paths (car (read-from-string shell-output))))1591 ;; (dolist (path load-paths)1592 ;; (add-to-list 'compilation-search-path path)))1593 1586 (add-to-list 'geiser-guile-load-path "~/projects/guix/"))) 1594 1587
Note:
See TracChangeset
for help on using the changeset viewer.