The value of left_sep and right_sep can also be a table or a function returning a table. The value can also be equal to the name of one of the default separators. You can use a function that returns a string just like the other component values. The value of left_sep and right_sep can just be set to a string that's displayed. There are two types of separator values that you can put in a component, which are left_sep and right_sep, which represent the separator on the left and the right side of the component, respectively. Separators are both the simplest and the trickiest part of Feline. ![]() If a name is not provided, Feline automatically generates a unique name for the highlight group based on the other values. So if you provide the name VimInsert, the highlight group created will have the name StatusComponentVimInsert. Note that StatusComponent is prepended to the name you provide. hl.name (string): Name of highlight group created by Feline (eg: 'VimInsert').hl.style (string): Formatting style of text.(eg: #000000').īy default it uses the default background color provided in the setup() function. hl.bg (string): RGB hex or name of background color.(eg: '#FFFFFF').īy default it uses the default foreground color provided in the setup() function. hl.fg (string): RGB hex or name of foreground color.hl (table): Determines the highlight settings.A component can have the following values: Note that you can omit all of the component values except provider, in which case the defaults would be used instead. For example, since provider requires a string value, if you set it to a function, the function must also return a string value. But in case a function is provided, the type of value the function returns must be the same as the type of value required by the component. ![]() Most values that a component requires can also use a function without arguments that Feline will automatically evaluate. Now you can customize each component to your liking. NOTE: If you use the index instead of table.insert, remember to put the correct index. Insert another component that will be on the right side of the statusline - when the window is active: Insert a component that will be on the right side of the statusline - when the window is active: So first, in your a file, you have to initialize the components table And in each of the left and right tables, there needs to be two more tables, active and inactive, which will dictate whether the component is a part of the statusline when it's in the active window or the inactive window. Inside the components table, there needs to be two more tables, left and right, which will dictate if the component should be put in the left side or the right side of the statusline. The components table needs to contain the statusline components while the properties table needs to contain the statusline properties. If you don't mind getting your hands dirty, then I recommend making your own statusline, it's very easy to do so, but for that you have to first understand how Feline works.įeline has a statusline generator that takes a components value and a properties value, both of them are Lua tables. Open your Terminal and enter the following command: Using Neovim's built-in plugin manager (Linux or MacOS):.nvim-lspconfig - To configure LSP for diagnostics.Truecolor support for Neovim (with set termguicolors and a truecolor supporting Terminal / GUI).Minimalistic, only provides the bare minimum and allows the user to build their own components very easily.Built-in providers for things like vi-mode, file info, file size, cursor position, diagnostics (using Neovim's buiilt-in LSP), git branch and diffs (using gitsigns.nvim), etc.Completely customizability over every component. ![]() But for those who just want to get stuff done, Feline also provides a default statusline which should fit the needs of most people. Feline is less of a statusline unto itself but more of a framework for you to easily build your own statusline on, while being able to tweak every tiny bit to your heart's content. A minimal, stylish and customizable statusline for Neovim written in Luaįeline is a lua statusline inspired by galaxyline, but being more minimal and keeping complete customizability in mind.
0 Comments
Leave a Reply. |