Skip to content

Commit

Permalink
docs: update README/OPTIONS for mini.icons support
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Jul 26, 2024
1 parent 57ed250 commit c893b41
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
12 changes: 10 additions & 2 deletions OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,17 @@ require("fzf-lua").setup({ files = { formatter = "path.filename_first" } })

#### globals.file_icons

Type: `boolean`, Default: `true`
Type: `boolean|string`, Default: `true`

If available, display file icons.

Set to `true` will attempt to use "nvim-web-devicons" and fallback to "mini.icons", other possible
values are `devicons` or `mini` which force loading a specific icons plugin, for example:

If available, add devicons to files.
```lua
:FzfLua files file_icons=mini
:lua require("fzf-lua").files({ file_icons = "devicons" })
```

#### globals.git_icons

Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ at it. That, **and colorful file icons and git indicators!**.
- [`fzf`](https://github.com/junegunn/fzf) version > `0.25`
**or** [`skim`](https://github.com/lotabout/skim) binary installed
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons)
**or** [mini.icons](https://github.com/echasnovski/mini.icons)
(optional)

### Optional dependencies
Expand Down Expand Up @@ -157,6 +158,8 @@ Using [vim-plug](https://github.com/junegunn/vim-plug)
Plug 'ibhagwan/fzf-lua', {'branch': 'main'}
" optional for icon support
Plug 'nvim-tree/nvim-web-devicons'
" or if using mini.icons/mini.nvim
" Plug 'echasnovski/mini.icons'
```

Using [packer.nvim](https://github.com/wbthomason/packer.nvim)
Expand All @@ -165,6 +168,8 @@ Using [packer.nvim](https://github.com/wbthomason/packer.nvim)
use { "ibhagwan/fzf-lua",
-- optional for icon support
requires = { "nvim-tree/nvim-web-devicons" }
-- or if using mini.icons/mini.nvim
-- requires = { "echasnovski/mini.icons" }
}
```

Expand Down Expand Up @@ -807,9 +812,9 @@ require'fzf-lua'.setup {
},
-- PROVIDERS SETUP
-- use `defaults` (table or function) if you wish to set "global-provider" defaults
-- for example, disabling file icons globally and open the quickfix list at the top
-- for example, using "mini.icons" globally and open the quickfix list at the top
-- defaults = {
-- file_icons = false,
-- file_icons = "mini",
-- copen = "topleft copen",
-- },
files = {
Expand Down
12 changes: 10 additions & 2 deletions doc/fzf-lua-opts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,18 @@ Or via `setup` for permanency:

globals.file_icons *fzf-lua-opts-globals.file_icons*

Type: `boolean`, Default: `true`
Type: `boolean|string`, Default: `true`

If available, display file icons.

If available, add devicons to files.
Set to `true` will attempt to use "nvim-web-devicons" and fallback to
"mini.icons", other possible values are `devicons` or `mini` which force
loading a specific icons plugin, for example:

>lua
:FzfLua files file_icons=mini
:lua require("fzf-lua").files({ file_icons = "devicons" })
<


globals.git_icons *fzf-lua-opts-globals.git_icons*
Expand Down

0 comments on commit c893b41

Please sign in to comment.