-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathconfig.lua
More file actions
36 lines (34 loc) · 986 Bytes
/
Copy pathconfig.lua
File metadata and controls
36 lines (34 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Translate = {
handler = "qa_handler",
opts = {
component_width = "60%",
component_height = "50%",
query = {
title = " Trans ",
hl = { link = "Define" },
},
input_box_opts = {
size = "15%",
win_options = {
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
},
},
preview_box_opts = {
size = "85%",
win_options = {
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
},
},
-- Customize the behavior of accept (default keymap: y/Y),
-- the default action of copying text will include a newline character at the end.
-- This sample code copies text without the trailing newline character.
accept = {
action = function(self, opts)
local res = vim.tbl_filter(function(item)
return item ~= ""
end, vim.api.nvim_buf_get_lines(opts.bufnr, 0, -1, true))
vim.fn.setreg("+", table.concat(res, "\n"))
end,
},
},
},