emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.75k stars 873 forks source link

Feature Request: re-arrange mode line order #2571

Open alanz opened 3 years ago

alanz commented 3 years ago

2567 brought in a much-improved progress reporting widget.

But it highlighted for me a niggling issue. All the interesting stuff reported in the mode line by lsp-mode comes right at the end of the mode line, where for me most of the time it is invisible. (I use a fairly "vanilla" setup, tweaked slightly with the excellent blackout package to remove or shorten displayed items)

image

The legacy progress reporting modified the mode lighter, which is far to the left, so visible even when you have many windows open side by side. With the progress added to global-mode-string, it has moved to the end.

Perhaps we should consider moving the lsp-mode information to the left, between vc-info and mode info.

Using lsp-mode at: abac0d7450d91a8f386f8be82e36f207ea36f77a

ericdallo commented 3 years ago

Do you see any issues with that @yyoncho, also we could take the opportunity to fix that spacing issue in modeline (add space to the left instead of right, something like that)

yyoncho commented 3 years ago

I think that we should group all lsp-mode related modeline stuff in a separate variable(e. g. lsp-modeline-string) instead of using global-mode-string and then place it on the modeline probably before the major mode list similar to what evil-mode does(I guess there are other packages doing that). When we do so, we are much more in control to do the proper spacing because only lsp-mode will use that variable.

yyoncho commented 3 years ago

For reference, here it is mode-line-format on my side

("%e" mode-line-front-space mode-line-mule-info mode-line-client mode-line-modified mode-line-remote mode-line-frame-identification mode-line-buffer-identification "   " mode-line-position evil-mode-line-tag
 (vc-mode vc-mode)
 "  " mode-line-modes mode-line-misc-info mode-line-end-spaces)

global-mode-string goes in mode-line-misc-info

ericdallo commented 3 years ago

Yeah this looks a good idea, doom-modeline does that similar

yyoncho commented 3 years ago

Yeah this looks a good idea, doom-modeline does that similar

doom-modeline will have to be fixed separately I guess.

yyoncho commented 3 years ago

FWIW until the issue is fixed one can use diminish package to clean the major/minor modes from the modeline.