Guihua: A Lua Gui and util library for nvim plugins
Listview
Listview with fzy finder
Neovim multigrid external buffer/terminal
This cool screen shows an external terminal running lazygit and an external floating window running guihua listview
More screen shot please refer to Navigator.lua
Please refer to test file of how to use it
Lua OOP is powered by middleclass fzy is powered by romgrk fzy-lua-native with modified version of sorter/quicksort to sort list of tables
Plugin has implementation of fzy with both ffi and native lua. If you like to try ffi please run make
use {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}
-- default mapping
maps = {
close_view = '<C-e>',
send_qf = '<C-q>',
save = '<C-s>',
jump_to_list = '<C-w>k',
jump_to_preview = '<C-w>j',
prev = '<C-p>',
next = '<C-n>',
pageup = '<C-b>',
pagedown = '<C-f>',
confirm = '<C-o>',
split = '<C-s>',
vsplit = '<C-v>',
tabnew = '<C-t>',
}
-- default icons for panel
-- will be tbl_deep_extend() if you override any of those
local icons = {
panel_icons = {
section_separator = '─', --'',
line_num_left = ':', --'',
line_num_right = '', --',
range_left = '', --'',
range_right = '',
inner_node = '', --├○',
folded = '◉',
unfolded = '○',
outer_node = '', -- '╰○',
bracket_left = '', -- ⟪',
bracket_right = '', -- '⟫',
},
syntax_icons = {
var = ' ', -- "👹", -- Vampaire
method = 'ƒ ', -- "🍔", -- mac
['function'] = ' ', -- "🤣", -- Fun
['arrow_function'] = ' ', -- "🤣", -- Fun
parameter = '', -- Pi
associated = '🤝',
namespace = '🚀',
type = ' ',
field = '🏈',
interface = '',
module = '📦',
flag = '🎏',
}
}
--
require('guihua.maps').setup({
maps = {
close_view = '<C-x>',
}
})
Plug 'ray-x/guihua.lua', {'do': 'cd lua/fzy && make' }
Usage: check the test files on how the api is used.