Skip to content

sunjon/stylish.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stylish.nvim

A collection of Stylish UI components for Neovim

Components are rendered using ASCII characters in the terminal. A font that supports glyphs introduced in Unicode version 13.0 is required for some effects.

This project is alpha/WIP. Feel free to open issues to contribute ideas.

stylish.ui.splashlogo (soon™)

screenshot

stylish.ui.clock

screenshot

stylish.ui.menu

screenshot

stylish.ui.graph (soon™)

screenshot

stylish.ui.keyboard_stats (soon™)

screenshot

stylish.ui.notify (soon™)

screenshot

Installation

use 'sunjon/stylish.nvim'
Plug 'sunjon/stylish.nvim'

Configuration

Testing stylish.ui_menu

Creating Menus:

vim.cmd [[
amenu Plugin.Fugitive.GFetch :GFetch | amenu Plugin.Fugitive.GPull :GPull | amenu Plugin.Fugitive.GPush :GPush
amenu File.Filetype.One :echo 1 | amenu File.Filetype.Two :echo 2 | amenu File.Filetype.Three :echo 3
amenu Edit.Recent.Foo :echo 'foo' | amenu Edit.Recent.Bar :echo 'bar' | amenu Edit.Recent.Baz :echo 'baz'
amenu Edit.Diff.Revision_1 :echo 'rev_1' | amenu Edit.Diff.Revision_2 :echo 'rev_2' | amenu Edit.Diff.Revision_3 :echo 'rev_3'
]]

for i = 1, 16 do
  vim.cmd('amenu OverflowList.Test_Thing_' .. i .. ' :echo ' .. i)
end

See :h menu for more details

Configuration: Menu

vim.api.nvim_set_keymap(
  'n',
  '<F1>',
  "<Cmd>lua require'stylish'.ui_menu(vim.fn.menu_get(''), {kind=menu, prompt = 'Main Menu', experimental_mouse = true}, function(res) print('### ' ..res) end)<CR>",
  { noremap = true, silent = true }
)

NOTE: experimental_mouse only works with Linux and xwininfo and xdotool installed.

Testing stylish.ui_clock

Configuration: Clock

vim.api.nvim_set_keymap(
  'n',
  '<F12>',
  '<Cmd>lua require"stylish".ui_clock()<CR>',
  { noremap = true, silent = true }
)

TODO:

  • vim.ui.menu
  • vim.ui.clock (fading not working, no background)
  • vim.ui.select # in development
  • vim.ui.notify # in development
  • vim.ui.input
  • mouse controls
  • animator
  • documentation

About

Stylish UI components for Neovim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages