Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/notomo/stlparts.nvim

Neovim lua statusline components
https://github.com/notomo/stlparts.nvim

neovim neovim-plugin

Last synced: 3 months ago
JSON representation

Neovim lua statusline components

Awesome Lists containing this project

README

        

# stlparts.nvim

statusline components.

## Example

```lua
local stlparts = require("stlparts")

local path = function()
return vim.fn.expand("%:p:~")
end

local column = function()
return vim.fn.col(".")
end

local filetype = function()
return vim.bo.filetype
end

local Separate = stlparts.component.separate

stlparts.set("default", {
" ",
Separate({
path,
{ column, " ", filetype },
}),
" ",
})

vim.opt.statusline = [[%!v:lua.require("stlparts").build("default")]]
```