mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 09:18:51 +02:00
fix(lsp): upstream inlay_hint rename
This commit is contained in:
parent
6d8be7ae46
commit
089606b48d
2 changed files with 6 additions and 4 deletions
|
@ -112,8 +112,8 @@ map("n", "<leader>ul", function() Util.toggle("relativenumber", true) Util.toggl
|
||||||
map("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
|
map("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
|
||||||
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
|
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
|
||||||
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
|
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
|
||||||
if vim.lsp.buf.inlay_hint then
|
if vim.lsp.inlay_hint then
|
||||||
map("n", "<leader>uh", function() vim.lsp.buf.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" })
|
map("n", "<leader>uh", function() vim.lsp.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lazygit
|
-- lazygit
|
||||||
|
|
|
@ -98,10 +98,12 @@ return {
|
||||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||||
end
|
end
|
||||||
|
|
||||||
if opts.inlay_hints.enabled and vim.lsp.buf.inlay_hint then
|
local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint
|
||||||
|
|
||||||
|
if opts.inlay_hints.enabled and inlay_hint then
|
||||||
Util.on_attach(function(client, buffer)
|
Util.on_attach(function(client, buffer)
|
||||||
if client.server_capabilities.inlayHintProvider then
|
if client.server_capabilities.inlayHintProvider then
|
||||||
vim.lsp.buf.inlay_hint(buffer, true)
|
inlay_hint(buffer, true)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue