jixiuf / vterm-toggle

toggles between the vterm buffer and whatever buffer you are editing.
GNU General Public License v3.0
189 stars 12 forks source link

Usage with straight.el #21

Closed rirze closed 3 years ago

rirze commented 3 years ago

Hi,

Do you have a working configuration with using the straight.el package manager? I have this config currently and I have numerous problems with not being able to use or import vterm since vterm-toggle uses the same directory.

(use-package vterm
  :straight (:post-build (let ((vterm-always-compile-module t))
                           (require 'vterm)))
  :bind (("C-c v" . vterm)
         :map vterm-mode-map
         ("C-g" . vterm--self-insert))
  )

(use-package vterm-toggle
  :straight (vterm :type git :host github :repo "jixiuf/vterm-toggle")
  :custom
  (vterm-toggle-fullscreen-p nil)
  )

Problems include:

Do you have any insight about this?

jixiuf commented 3 years ago

Vterm-toggle just (require 'vterm), I don't use straight, so don't know how to fix that .

jixiuf commented 3 years ago
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)

(setq vterm-always-compile-module t)
(use-package vterm
  :straight t
  :bind (("C-c v" . vterm)
         :map vterm-mode-map
         ("C-g" . vterm--self-insert)))

(use-package vterm-toggle
  :straight (vterm-toggle :type git :host github :repo "jixiuf/vterm-toggle" :branch "master"))

should be fixed

rirze commented 3 years ago

Thanks, the fix was:

  :straight (vterm :type git :host github :repo "jixiuf/vterm-toggle"))

to

  :straight (vterm-toggle :type git :host github :repo "jixiuf/vterm-toggle"))

Once upon a time, this wouldn't work and needed to use the exiting vterm source. Good to know this works now. Thanks!