https://github.com/ray-x/guihua.lua
A GUI library for Neovim plugin developers
https://github.com/ray-x/guihua.lua
fuzzy-search lua neovim-plugin ui
Last synced: 3 months ago
JSON representation
A GUI library for Neovim plugin developers
- Host: GitHub
- URL: https://github.com/ray-x/guihua.lua
- Owner: ray-x
- License: mit
- Created: 2021-04-16T02:30:13.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-02T02:57:39.000Z (9 months ago)
- Last Synced: 2025-03-28T12:03:00.837Z (4 months ago)
- Topics: fuzzy-search, lua, neovim-plugin, ui
- Language: Lua
- Homepage:
- Size: 338 KB
- Stars: 179
- Watchers: 4
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - ray-x/guihua.lua - A Lua UI library. Includes a fzy search bar, list view and tree view modules. (Neovim Lua Development / Quickfix)
- awesome-neovim-sorted - ray-x/guihua.lua
- awesome-neovim-sorted - ray-x/guihua.lua
README

Guihua: A Lua Gui and util library for nvim plugins- Provide floating windows
- A modified wrapper for fzy
- TextView, ListView, Preview etc* Listview
* Listview with fzy finder
* Neovim multigrid external buffer/terminal

* Neovim vim.ui.input and vim.ui.select patch
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](https://github.com/ray-x/navigator.lua)
Please refer to test file of how to use it
Lua OOP is powered by [middleclass](https://github.com/kikito/middleclass)
fzy is powered by [romgrk fzy-lua-native](https://github.com/romgrk/fzy-lua-native) with modified version of sorter/quicksort to sort list of tables# Install
Plugin has implementation of fzy with both ffi and native lua. If you like to try ffi please run make
## Packer
```lua
use {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}
```## Setup
```lua
-- default mapping
maps = {
close_view = '',
send_qf = '',
save = '',
jump_to_list = 'k',
jump_to_preview = 'j',
prev = '',
next = '',
pageup = '',
pagedown = '',
confirm = '',
split = '',
vsplit = '',
tabnew = '',
}-- 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 = '',
}
})
```## Plug
```vim
Plug 'ray-x/guihua.lua', {'do': 'cd lua/fzy && make' }
```Usage: check the test files on how the api is used.