Skip to content

Commit

Permalink
update deprecate function for 0.10 release
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 16, 2024
1 parent 4eecb4b commit cb62b3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lua/lspsaga/definition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local util = require('lspsaga.util')
local win = require('lspsaga.window')
local buf_del_keymap = api.nvim_buf_del_keymap
local beacon = require('lspsaga.beacon').jump_beacon
local islist = util.is_ten and vim.islist or vim.tbl_islist
local def = {}
def.__index = def

Expand Down Expand Up @@ -227,7 +228,7 @@ function def:definition_request(method, handler_T, args)
fn.settagstack(api.nvim_get_current_win(), { items = items }, 't')

local res
if not vim.tbl_islist(result) then
if not islist(result) then
res = result
elseif result[1] then
res = result[1]
Expand Down
3 changes: 2 additions & 1 deletion lua/lspsaga/hover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local config = require('lspsaga').config
local win = require('lspsaga.window')
local util = require('lspsaga.util')
local treesitter = vim.treesitter
local islist = util.is_ten and vim.islist or vim.tbl_islist
local hover = {}

function hover:clean()
Expand Down Expand Up @@ -250,7 +251,7 @@ function hover:do_request(args)
else
value = result.contents.value
end
elseif vim.tbl_islist(result.contents) then -- MarkedString[]
elseif islist(result.contents) then -- MarkedString[]
if vim.tbl_isempty(result.contents) and ignore_error(args) then
vim.notify('No information available')
return
Expand Down

0 comments on commit cb62b3c

Please sign in to comment.