allow preview more lines

neovim_0.6
ray-x 3 years ago
parent b9f8ed3c55
commit f33a3e8e7d

@ -3,6 +3,7 @@ _NgConfigValues = {
debug = false, -- log output not implemented
width = 0.6, -- valeu of cols TODO allow float e.g. 0.6
preview_height = 0.35,
preview_lines = 40,
height = 0.35,
default_mapping = true,
keymaps = {}, -- e.g keymaps={{key = "GR", func = "references()"}, } this replace gr default mapping

@ -122,7 +122,8 @@ function M.new_list_view(opts)
width = math.min(120, width)
local wheight = math.floor(1 + api.nvim_get_option("lines")
* (_NgConfigValues.height + _NgConfigValues.preview_height))
local pheight = math.floor(api.nvim_get_option("lines") * _NgConfigValues.preview_height)
local pheight = math.max(_NgConfigValues.preview_lines, math.floor(
api.nvim_get_option("lines") * _NgConfigValues.preview_height))
local prompt = opts.prompt or false
if opts.rawdata then
data = items

@ -75,6 +75,7 @@ function M.prepare_for_render(items, opts)
call_by_presented = true
end
end
-- log(items[1])
for i = 1, #items do
local space

Loading…
Cancel
Save