Skip to content

Commit 2923666

Browse files
authored
Fix handling false which is returned by hint_inline function (#365)
1 parent d50e40b commit 2923666

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lua/lsp_signature/init.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,12 @@ local function virtual_hint(hint, off_y)
150150
or '🐼 '
151151

152152
if off_y and off_y ~= 0 then
153-
local inline = type(_LSP_SIG_CFG.hint_inline) == 'function' and _LSP_SIG_CFG.hint_inline() == 'inline'
154-
or _LSP_SIG_CFG.hint_inline
153+
local inline
154+
if type(_LSP_SIG_CFG.hint_inline) == 'function' then
155+
inline = vim.tbl_contains({ 'inline', 'eol', 'right_align' }, _LSP_SIG_CFG.hint_inline())
156+
else
157+
inline = _LSP_SIG_CFG.hint_inline
158+
end
155159
-- stay out of the way of the pum
156160
if completion_visible or inline then
157161
show_at = cur_line

0 commit comments

Comments
 (0)