Skip to content

Commit

Permalink
[change]: Please use the latest nightly neovim,Adapt to new inlay_hin…
Browse files Browse the repository at this point in the history
…t api changes

Please use the latest nightly neovim
  • Loading branch information
jinzhongjia committed Apr 20, 2024
1 parent a7b2b90 commit 2ac4659
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions lua/LspUI/inlay_hint/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ M.init = function()
})
== "file"
then
inlay_hint(buffer_id, true)
inlay_hint(true, {
bufnr = buffer_id,
})
table.insert(buffer_list, buffer_id)
end
end
Expand Down Expand Up @@ -105,7 +107,9 @@ M.init = function()
})
if not vim.tbl_isempty(clients) then
if is_open then
inlay_hint(buffer_id, true)
inlay_hint(true, {
bufnr = buffer_id,
})
end
table.insert(buffer_list, buffer_id)
end
Expand All @@ -124,15 +128,19 @@ M.run = function()

for _, buffer_id in pairs(buffer_list) do
if api.nvim_buf_is_valid(buffer_id) then
inlay_hint(buffer_id, true)
inlay_hint(true, {
bufnr = buffer_id,
})
end
end
else
-- close

for _, buffer_id in pairs(buffer_list) do
if api.nvim_buf_is_valid(buffer_id) then
inlay_hint(buffer_id, false)
inlay_hint(false, {
bufnr = buffer_id,
})
end
end
end
Expand All @@ -148,7 +156,9 @@ M.deinit = function()

for _, buffer_id in pairs(buffer_list) do
if api.nvim_buf_is_valid(buffer_id) then
inlay_hint(buffer_id, false)
inlay_hint(false, {
bufnr = buffer_id,
})
end
end

Expand Down

0 comments on commit 2ac4659

Please sign in to comment.