diff options
author | Matthew Kosarek <mattkae@protonmail.com> | 2022-10-15 19:44:49 -0400 |
---|---|---|
committer | Matthew Kosarek <mattkae@protonmail.com> | 2022-10-15 19:44:49 -0400 |
commit | cc2dc076d8015152b64ebb83c7bd07fb2cf70912 (patch) | |
tree | 1e076571d54eb2c598f876e1bd330248e102cafe | |
parent | 1aff76170d0bf4c728770a507a3cf072c9bf9cfd (diff) |
Adding vterm and a toggle function
-rw-r--r-- | init.el | 6 | ||||
-rw-r--r-- | lisp/general.el | 20 |
2 files changed, 23 insertions, 3 deletions
@@ -14,7 +14,7 @@ (setq package-list - '(good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org neotree)) + '(good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org neotree minimap vterm vterm-toggle)) ;; Fetch the list of packages available (unless package-archive-contents @@ -58,11 +58,11 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-safe-themes - '("5859f61b502aa335b502b231c86a051210cb5974f74966e620c31be3a966659f" "32a9fa0f3722e679ed77a28aed3ae99161ef54dc27c35fd19e68e0410633960b" default)) + '("5859f61b502aa335b502b231c86a051210cb5974f74966e620c31be3a966659f" "32a9fa0f3722e679ed77a28aed3ae99161ef54dc27c35fd19e68e0410633960b" default)) '(org-agenda-files (list org-directory)) '(org-directory "~/Documents/org") '(package-selected-packages - '(neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))) + '(vterm-toggle vterm minimap neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))) ;;; init.el ends here (custom-set-faces diff --git a/lisp/general.el b/lisp/general.el index 00c0a76..89c60b4 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -164,5 +164,25 @@ ) +;; Vterm +(require 'vterm) +(require 'vterm-toggle) +(setq vterm-toggle-fullscreen-p nil) +(add-to-list 'display-buffer-alist + '((lambda (buffer-or-name _) + (let ((buffer (get-buffer buffer-or-name))) + (with-current-buffer buffer + (or (equal major-mode 'vterm-mode) + (string-prefix-p vterm-buffer-name (buffer-name buffer)))))) + (display-buffer-reuse-window display-buffer-at-bottom) + ;;(display-buffer-reuse-window display-buffer-in-direction) + ;;display-buffer-in-direction/direction/dedicated is added in emacs27 + ;;(direction . bottom) + ;;(dedicated . t) ;dedicated is supported in emacs27 + (reusable-frames . visible) + (window-height . 0.3))) +(bind-key* (kbd "M-t") 'vterm-toggle) + + (provide 'general) ;;; general.el ends here |