-
-
Notifications
You must be signed in to change notification settings - Fork 155
go.nvim enables inlay_hints for all files (not just *.go) by default #579
Description
Just calling setup with defaults causes the plugin to enable inlay hints everywhere. This behavior is non-obvious, and tricky to disable if you don't know why it's happening. Simply calling vim.lsp.inlay_hints.enable(false) somewhere in your config won't do the job if it runs before this plugin gets set up.
My best guess is that this is a result of change 844b66b.
To reproduce, you need to set up a language server for a different language that supports inlay hints and edit a file in that language. I've reproduced it in Nvim 0.11.1 with dart files using dartls, and C++ files using clangd. In some cases the setting change occurs slightly after the first file is opened, which complicates things a bit. If at first you don't succeed, open a second file.
To work around this, disable inlay_hints in go.nvim. Something like:
require('go').setup {
lsp_inlay_hints = { enable = false },
}