minimal extui fuzzy finder for neovim
1# artio.nvim
2
3A minimal, nature-infused file picker for Neovim using ui2.
4Inspired by forest spirits and the calm intuition of hunting, Artio helps you gently select files without the weight of heavy fuzzy-finder dependencies.
5
6
7
8## features
9
10Requires Neovim `>= 0.12`
11
12- Lightweight picker window built on Neovim's ui2
13- Prompt + list UI components - minimal and focused
14- Fuzzy filtering using matchfuzzy (built-in)
15- Icon support for common filetypes through [mini.icons](https://github.com/echasnovski/mini.nvim) _(optional)_
16- No heavy dependencies - pure Lua
17
18### ui2
19
20artio requires ui2 to be enabled.
21
22an example of how to set this up is:
23
24```lua
25require("vim._core.ui2").enable({ enable = true, msg = {
26 target = "msg",
27} })
28```
29
30## installation
31
32`vim.pack`
33
34```lua
35vim.pack.add({{ src = "https://codeberg.org/comfysage/artio.nvim" }})
36```
37
38`lazy.nvim`
39
40```lua
41{
42 "comfysage/artio.nvim", lazy = false,
43}
44```
45
46## configuration
47
48```lua
49require("artio").setup({
50 opts = {
51 preselect = true, -- whether to preselect the first match
52 bottom = true, -- whether to draw the prompt at the bottom
53 shrink = true, -- whether the window should shrink to fit the matches
54 promptprefix = "", -- prefix for the prompt
55 prompt_title = true, -- whether to draw the prompt title
56 pointer = "", -- pointer for the selected match
57 marker = "│", -- prefix for marked items
58 infolist = { "list" }, -- index: [1] list: (4/5)
59 use_icons = true, -- requires mini.icons
60 },
61 win = {
62 height = 12,
63 hidestatusline = false, -- works best with laststatus=3
64 },
65 -- NOTE: if you override the mappings, make sure to provide keys for all actions
66 mappings = {
67 ["<down>"] = "down",
68 ["<up>"] = "up",
69 ["<cr>"] = "accept",
70 ["<esc>"] = "cancel",
71 ["<tab>"] = "mark",
72 ["<c-g>"] = "togglelive",
73 ["<c-l>"] = "togglepreview",
74 ["<c-q>"] = "setqflist",
75 ["<m-q>"] = "setqflistmark",
76 },
77})
78
79-- override built-in ui select with artio
80vim.ui.select = require("artio").select
81
82vim.keymap.set("n", "<leader><leader>", "<Plug>(artio-files)")
83vim.keymap.set("n", "<leader>fg", "<Plug>(artio-grep)")
84
85-- smart file picker
86vim.keymap.set("n", "<leader>ff", "<Plug>(artio-smart)")
87
88-- general built-in pickers
89vim.keymap.set("n", "<leader>fh", "<Plug>(artio-helptags)")
90vim.keymap.set("n", "<leader>fb", "<Plug>(artio-buffers)")
91vim.keymap.set("n", "<leader>f/", "<Plug>(artio-buffergrep)")
92vim.keymap.set("n", "<leader>fo", "<Plug>(artio-oldfiles)")
93```
94
95### customize builtin pickers
96
97you're able to override the command used to find files:
98
99```lua
100-- ignore hidden files
101vim.keymap.set("n", "<leader>ff", function()
102 require('artio.builtins').files({
103 findprg = [[ find . -type f -iregex '.*$*.*' -not -path '*/[@.]*' ]],
104 })
105end)
106```
107
108# community
109
110issues are available on [github][github issues] and [codeberg][codeberg issues].
111
112pr's are limited to [codeberg](https://codeberg.org/comfysage/artio.nvim/pulls)
113
114[github issues]: https://github.com/comfysage/artio.nvim/issues
115[codeberg issues]: https://codeberg.org/comfysage/artio.nvim/issues