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.