-1

Previously, vim.lsp.inlay_hint.enable() used to toggle inlay hints. However, this functionality has been removed and now vim.lsp.inlay_hint.enable() just enables inlay hints. How can I toggle inlay hints like I used to?

1
  • Would love for whomever downvoted to explain.. Jan 20 at 1:56

1 Answer 1

1

This is addressed in this comment on GitHub

lsp.inlay_hint.enable(0, not lsp.inlay_hint.is_enabled())

It seems moving forward the lua api will not include implicit toggling, or a .toggle() functionality.

1
  • @D.BenKnoble I took it out on your suggestion Jan 17 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.