emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

Tab-bar-mode causes tab-bars to appear in childframes for lsp-ui info #654

Closed RKBK closed 2 years ago

RKBK commented 2 years ago

If using childframes to display e.g. signature info at point, while at the same time having activated tab-bar-mode, the childframe will also get a tab-bar. This childframe tab-bar has no use, and will cause the height of the childframe to change, obscuring the point.

To reproduce:

  1. Enter tab-bar-mode, e.g. by opening a new tab (C-x t n)
  2. Open a buffer where lsp and lsp-ui are running, having set lsp-ui to use childframes (and not e.g. xwidgets)
  3. Symbol at point info will look something like this: image
RKBK commented 2 years ago

A work-around for this issue is to set:

(setq tab-bar-show 1)

as, according to the doc:

The variable ‘tab-bar-show’ controls whether the Tab Bar mode is turned on automatically. If the value is ‘t’, then ‘tab-bar-mode’ is enabled when using the commands that create new tabs. The value ‘1’ hides the tab bar when it has only one tab, and shows it again when more tabs are created.

In other words, because the lsp-ui doc child frame will always just have one tab (c.f. image in the issue), the tab bar is never shown on the lsp-ui child frame.