dengste / minimap

Sidebar showing a "mini-map" of a buffer
168 stars 14 forks source link

Maximum Width #26

Open soup-in-boots opened 1 year ago

soup-in-boots commented 1 year ago

Hey there! I've been using doom emacs with minimap enabled for awhile now. I appreciate all the work you've done, and it works great!

My one nit-pick has to do with resizing. I split my buffers frequently, which can result in some odd proportions. I typically fix this with balance-windows. This does a fine job most of the time, but when I have minimap open, it's treated just like any of my other buffers, and as a result it expands to be much wider than normal. Given my character line limits, this leaves a lot of space unutilized.

Similarly, if I open minimap while I have two editable buffers open, it is much more narrow than if I had one.

In the case of the latter, I can use the minimap-minimum-width variable to prevent it from becoming too small. I would love to have an option like minimap-maximum-width to prevent it from growing too large.

samrjack commented 1 year ago

@soup-in-boots Hello, I tried to add this. My my fork is here so try it out to see if it works the way you'd like and report back. I'll try to merge it in later, but I think that will require signing some form as stated on the bottom of the README.

I set the default max to be 30 which is the same as the min. Let me know if, based off your usage, you think it should be more or default set to nil.

Hope this helps!

Also will add (in case you or others interested don't add packages like this often) the recipe for using this repo. In your packages.el file in the ~/.doom.d directory, add this snippet:

(package! minimap :recipe
  (:host github
   :repo "samrjack/minimap"))

and then sync with doom sync -u.