Neovim for Beginners — Window Bar

Configure the window bar for a better coding experience.

alpha2phi
4 min readJun 20, 2022
Neovim for Beginners — Window Bar

In this article, we will explore the basics of the window bar (:h winbar), and learn how to customize it to show the current code context using LSP.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Window Bar

The window bar is a bar that is shown at the top of every window when the winbar option is configured.

The winbar (:h winbar) option can be either global or local to a window (:h global-local). By default the value is empty.

When non-empty, the winbar option enables the window bar and determines its contents and the value is evaluated just like the status line (:h ‘statusline’).

We already talked about the status line in a previous article.

In the lua/statusline/init.lua file, we have the following configuration.

--

--

alpha2phi
alpha2phi

Written by alpha2phi

Software engineer, Data Science and ML practitioner.

No responses yet