aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua3
-rw-r--r--lspc.lua2
2 files changed, 2 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 2f6351c..c85df1e 100644
--- a/init.lua
+++ b/init.lua
@@ -362,14 +362,13 @@ local function lspc_select(choices)
local cmd = 'printf "' .. menu_input .. '" | ' .. lspc.menu_cmd
lspc.log('collect choice using: ' .. cmd)
- if lspc.menu_cmd == 'vis-menu' then
+ if lspc.menu_cmd:sub(0, 8) == 'vis-menu' then
status, output = vis:pipe(vis.win.file, {start = 0, finish = 0}, cmd)
else
local menu = io.popen(cmd)
output = menu:read('*a')
local _, _, _status = menu:close()
status = _status
-
end
local choice = nil
diff --git a/lspc.lua b/lspc.lua
index 299c2a2..7894507 100644
--- a/lspc.lua
+++ b/lspc.lua
@@ -13,7 +13,7 @@ local lspc = {
autostart = true,
-- program used to let the user make choices
-- The available choices are pass to <menu_cmd> on stdin separated by '\n'
- menu_cmd = 'vis-menu',
+ menu_cmd = 'vis-menu -l 10',
-- program used to ask the user for confirmation
confirm_cmd = 'vis-menu',