fix(lsp): only enableinlay hints for when buffer is an actual file. See #3284

This commit is contained in:
Folke Lemaitre
2024-05-23 07:13:41 +02:00
parent f9b31372ae
commit 46cf5347b5

View File

@ -141,7 +141,9 @@ return {
-- inlay hints
if opts.inlay_hints.enabled then
LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer)
LazyVim.toggle.inlay_hints(buffer, true)
if vim.api.nvim_buf_is_valid(buffer) and vim.bo[buffer].buftype == "" then
LazyVim.toggle.inlay_hints(buffer, true)
end
end)
end