Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/notomo/stlparts.nvim
- Owner: notomo
- License: mit
- Created: 2022-01-23T10:55:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T11:14:23.000Z (7 months ago)
- Last Synced: 2024-04-22T12:31:21.387Z (7 months ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 71.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stlparts.nvim
statusline components.
## Example
```lua
local stlparts = require("stlparts")local path = function()
return vim.fn.expand("%:p:~")
endlocal column = function()
return vim.fn.col(".")
endlocal filetype = function()
return vim.bo.filetype
endlocal Separate = stlparts.component.separate
stlparts.set("default", {
" ",
Separate({
path,
{ column, " ", filetype },
}),
" ",
})vim.opt.statusline = [[%!v:lua.require("stlparts").build("default")]]
```