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: add tabnew action to files picker
robinwobin.dev
1 week ago
3e5c2ce6
6acaf0d4
+21
2 changed files
expand all
collapse all
unified
split
lua
artio
config.lua
utils.lua
+1
lua/artio/config.lua
···
52
["<m-q>"] = "setqflistmark",
53
["<c-s>"] = "split",
54
["<c-v>"] = "vsplit",
0
55
},
56
}
57
···
52
["<m-q>"] = "setqflistmark",
53
["<c-s>"] = "split",
54
["<c-v>"] = "vsplit",
55
+
["<c-t>"] = "tabnew",
56
},
57
}
58
+20
lua/artio/utils.lua
···
99
local buf = fn(item)
100
vim.api.nvim_open_win(buf, true, { win = -1, vertical = true })
101
end),
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
102
}
103
end
104
···
99
local buf = fn(item)
100
vim.api.nvim_open_win(buf, true, { win = -1, vertical = true })
101
end),
102
+
tabnew = require("artio").wrap(function(self)
103
+
coroutine.resume(self.co, 1)
104
+
end, function(self)
105
+
local item = self:getcurrent()
106
+
if not item then
107
+
return
108
+
end
109
+
local buf = fn(item)
110
+
vim.api.nvim_cmd({
111
+
cmd = "split",
112
+
args = { ("+%dbuf"):format(buf) },
113
+
---@diagnostic disable-next-line: missing-fields
114
+
mods = {
115
+
tab = 1,
116
+
silent = true,
117
+
},
118
+
}, {
119
+
output = false,
120
+
})
121
+
end),
122
}
123
end
124