Coder Social home page Coder Social logo

Comments (6)

seagle0128 avatar seagle0128 commented on August 16, 2024 1

Appreciate it for your great suggestion!
It's true the goal is keeping minimalistic, but I'm also open to accept PRs which are simple, nice and useful.

The global and buffer-position are nice to add to the mode-line. I will merge soon. Please test then.
Thanks a lot, again!

from doom-modeline.

weirdNox avatar weirdNox commented on August 16, 2024

That's great to hear! :D

from doom-modeline.

weirdNox avatar weirdNox commented on August 16, 2024

Ah, btw, in case you are wondering about the spaces in buffer-position, I tried to keep the original padding of 2 spaces like "__%l:%c %p__" in any combination of line-number-mode and column-number-mode and the percentage.

When the mode-line-position is empty, it will keep only two spaces "__", the one in buffer-position and the one in the main modeline spec.

I chose to do it like this, because if some mode completely replaces mode-line-position, they may choose to not pad it, but will at the very least have 1 space of padding (like pdf-view-mode, which only pads the string to the left).

from doom-modeline.

seagle0128 avatar seagle0128 commented on August 16, 2024

Thanks for the explanations, @weirdNox! I will think about it.

I've added global-mode-string in 4d4ec2e.
Regarding buffer-position, I have concerns about mode-line-percent-position and column-number-indicator-zero-based which are introduced in 26. Need more considerations for 25...

from doom-modeline.

weirdNox avatar weirdNox commented on August 16, 2024

Ohh, I had no idea, I just went to see the default value in my Emacs, which is v26, and adapted from it!

Maybe you could add a check outside with boundp, and if not defined, you could create them with a defvar.

Or instead of using them directly, using something like

(defvar doom-modeline-percent (or (bound-and-true-p mode-line-percent-position) '(-3 "%p"))
  "...")
(defvar doom-modeline-column-zero-based (or (bound-and-true-p column-number-indicator-zero-based) t)
  "...")

(...if the macro bound-and-true-p is defined in 25 ahah)

I don't know, your call :)

from doom-modeline.

weirdNox avatar weirdNox commented on August 16, 2024

Thanks! :D

from doom-modeline.

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.