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