Function: treemacs--setup-buffer

treemacs--setup-buffer is a byte-compiled function defined in treemacs-core-utils.el.

Signature

(treemacs--setup-buffer)

Documentation

Create and setup a buffer for treemacs in the right position and size.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(defun treemacs--setup-buffer ()
  "Create and setup a buffer for treemacs in the right position and size."
  (-if-let (lv-buffer (-some->
                       (--find (string= " *LV*" (buffer-name (window-buffer it)))
                               (window-list (selected-frame)))
                       (window-buffer)))
      (progn
        ;; workaround for LV windows like spacemacs' transient states preventing
        ;; side windows from popping up right
        ;; see https://github.com/abo-abo/hydra/issues/362
        (with-current-buffer lv-buffer (setf window-size-fixed nil))
        (treemacs--popup-window)
        (with-current-buffer lv-buffer (setf window-size-fixed t)))
    (treemacs--popup-window))
  (setq-local treemacs--in-this-buffer t))