Giter VIP home page Giter VIP logo

Comments (12)

cyrus-and avatar cyrus-and commented on June 11, 2024 1

I see, in any case all the fixes boil down to the same couple of things, they can be easily adapted. Honestly in my day to day Emacs usage I only had to fix imenu-list, but your mileage may vary, I guess.

Anyway, I'm closing this for now then, feel free to comment/reopen, if you need further assistance.

from zoom.

cyrus-and avatar cyrus-and commented on June 11, 2024

It's not super clear from your screenshot what's happening there... Can you help me to reproduce this? What happens if you run balance-windows in that case even with zoom-mode disabled?

It seems to work fairly well here:

image

(balance-window) broken this feature.

Anyway, I cannot get rid of balance-windows, and ignored windows are not zoomed yet are subject to balancing. So windows that plan to have a fixed size should enforce that. Now minimap seems to work here, yet it appears to be buggy, but for example, imenu-list works fine.

from zoom.

zw963 avatar zw963 commented on June 11, 2024

Hi, following is my config

(require 'zoom)

;; (custom-set-variables
;;  '(zoom-size '(0.618 . 0.618)))

(defun size-callback ()
  (cond ((> (frame-pixel-width) 1280) '(90 . 0.75))
        (t                            '(0.5 . 0.5))))

(global-set-key (kbd "C-x +") 'zoom)


(custom-set-variables
 '(zoom-size 'size-callback)
 '(zoom-ignored-major-modes '(dired-mode markdown-mode))
 '(zoom-ignored-buffer-names '(" *MINIMAP*"))
 )

(zoom-mode)

(provide 'zoom_init)

;;; zoom_init.el ends here

I am current ignore this line for minimap work correct.
if i am not do like this, will cause minimap expanded like this:

image

sorry i am not capture a screenshot on a external monitor, at that case, minimap get expanded will occupy all most half of my frame window.

from zoom.

zw963 avatar zw963 commented on June 11, 2024

BTW: you can try this minimap config. (basically, i move minimap to right, as VS code)

(require 'minimap)

(setq minimap-window-location 'right)
(setq minimap-width-fraction 0.05)

(global-set-key [(f10)] 'minimap-mode)

(defun initialize-minimap-delay (&optional frame)
  "run minimap mode"
  (when (display-graphic-p)
    (run-with-idle-timer 0 nil 'minimap-mode)))

(if (and (fboundp 'daemonp) (daemonp))
    (add-hook 'find-file-hook 'initialize-minimap-delay t)
  )

(provide 'minimap_init)

;;; minimap_init.el ends here

from zoom.

cyrus-and avatar cyrus-and commented on June 11, 2024

Oh OK, I apologise, now I recall. So, yeah imenu-list works because I added the fix in my init file, see this FAQ and #17.

So basically you can do the same for minimap:

(defun my/fix-minimap-size ()
  (with-selected-window (get-buffer-window " *MINIMAP*")
    (setq window-size-fixed t)
    (let ((width 10))
      (window-resize (selected-window) (- width (window-total-width)) t t))))

(add-hook 'minimap-mode-hook 'my/fix-minimap-size)

Hope it helps.

from zoom.

zw963 avatar zw963 commented on June 11, 2024

Okay, will try tomorrow on my external monitor.

from zoom.

zw963 avatar zw963 commented on June 11, 2024

so, for treemacs, i should do it like this, right?

correct output:

image

but current output:

image

from zoom.

cyrus-and avatar cyrus-and commented on June 11, 2024

treemacs appears to work out-of-the-box here.

Please try to use this .emacs when trying to reproduce these issues, so we can start from a common baseline:

(setq custom-file "/dev/null")

(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

(package-install 'zoom)
(package-install 'treemacs)

(custom-set-variables
 '(zoom-mode t))

I usually place it in a separate directory like /tmp/emacs/.emacs then I start Emacs with HOME=/tmp/emacs/ emacs.

from zoom.

zw963 avatar zw963 commented on June 11, 2024

treemacs appears to work out-of-the-box here.

Please try to use this .emacs when trying to reproduce these issues, so we can start from a common baseline:

(setq custom-file "/dev/null")

(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

(package-install 'zoom)
(package-install 'treemacs)

(custom-set-variables
 '(zoom-mode t))

I usually place it in a separate directory like /tmp/emacs/.emacs then I start Emacs with HOME=/tmp/emacs/ emacs.

Yes, i know treemacs works as expect, but, i use emacs-lsp, as you can see in the screenshot, which come from https://github.com/emacs-lsp/lsp-dart, it use lsp-treemacs package, it not work correct.

I can reproduce use following config following your guide:

(setq custom-file "/dev/null")

(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

(package-install 'zoom)
(package-install 'lsp-dart)

(custom-set-variables
 '(zoom-mode t))

Then, open a new file, named 1.dart, then run lsp-treemacs-symbols.

thanks.

BTW: are you try zoom with helm? it seem like not work well my helm config too.

(setq-default helm-display-buffer-default-height (* (frame-height) 0.618))

from zoom.

cyrus-and avatar cyrus-and commented on June 11, 2024

Look, the fix is always to set window-size-fixed to t for the windows you don't want to be zoomed. And this is something that the original package authors should do, regardless Zoom, when the decide the size IMHO.

All you have to do is to find an hook, set up an advice, or create a utility function, etc. where you do the following for the right window:

(setq window-size-fixed t)

I cannot fix all your packages, especially if you don't try first yourself to come up with a solution.

from zoom.

cyrus-and avatar cyrus-and commented on June 11, 2024

For lsp-treemacs, this seems a good staring point:

(defun fix (&rest _)
  (with-selected-window (get-buffer-window "*LSP Symbols List*")
    (setq window-size-fixed t)
    (let ((width 30))
      (window-resize (selected-window) (- width (window-total-width)) t t))))

(advice-add 'lsp-treemacs-render :after 'fix)

from zoom.

zw963 avatar zw963 commented on June 11, 2024

Hi, i am not zoom package for now because several issue with helm/lsp-treemacs, in fact, above solutiot work, because
buffer name hcan be change i guess, it get nil, anyway, i will try again when i am free for several days.

thank you very much for help

from zoom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.