tangled
alpha
login
or
join now
robinwobin.dev
/
artio.nvim
3
fork
atom
minimal extui fuzzy finder for neovim
3
fork
atom
overview
issues
pulls
pipelines
feat: allow disabling `opts.shrink`
robinwobin.dev
4 months ago
0f3bcd9a
43198e61
+9
3 changed files
expand all
collapse all
unified
split
README.md
lua
artio
config.lua
view.lua
+1
README.md
···
38
38
opts = {
39
39
preselect = true,
40
40
bottom = true,
41
41
+
shrink = true, -- whether the window should shrink to fit the matches
41
42
promptprefix = "",
42
43
pointer = "",
43
44
use_icons = true, -- requires mini.icons
+2
lua/artio/config.lua
···
7
7
---@class artio.config.opts
8
8
---@field preselect boolean
9
9
---@field bottom boolean
10
10
+
---@field shrink boolean
10
11
---@field promptprefix string
11
12
---@field pointer string
12
13
---@field use_icons boolean
···
24
25
opts = {
25
26
preselect = true,
26
27
bottom = true,
28
28
+
shrink = true,
27
29
promptprefix = "",
28
30
pointer = "",
29
31
use_icons = package.loaded['mini.icons'] and true or false,
+6
lua/artio/view.lua
···
389
389
lines[#lines + 1] = ("%s%s%s"):format(prefix, icon, item.text)
390
390
hls[#hls + 1] = match[2]
391
391
end
392
392
+
393
393
+
if not self.picker.opts.shrink then
394
394
+
for _ = 1, (maxlistheight - #lines) do
395
395
+
lines[#lines + 1] = ""
396
396
+
end
397
397
+
end
392
398
cmdline.erow = cmdline.srow + #lines
393
399
vim.api.nvim_buf_set_lines(ext.bufs.cmd, cmdline.srow, cmdline.erow, false, lines)
394
400