-
-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<leader>lh #175
Comments
I think to use inlay_hints feature we need neovim v0.10 or later |
@shreyas-a-s so I am on |
@jrock2004 Maybe it is indeed broken. I will test the latest neovim nightly on my machine (linux, not macOS btw) and reply back. |
@jrock2004 Found the culprit! It's just that in the settings for lua_ls, at hint = {
enable = false, -- this is the culprit line
arrayIndex = "Disable",
await = true,
paramName = "Disable",
paramType = true,
semicolon = "All",
setType = false,
}, I've enabled hints (i.e. set enable = true) and set the paramName to "All" and I can see hints when toggling with <space>lh. See the 'modename' and semicolons in this picture: NOTE: Atleast for me, when I open a lua file like this there is a delay of couple of seconds before lua language server fully analyses the code in current folder recursively. Hints can only be toggled after this delay. So when testing, after opening a file, wait a few seconds before trying to toggle hints. I hope this was the issue. Please tell if it works. |
@shreyas-a-s Works like a champ. Thanks |
@jrock2004 That's the thing. You need to go to |
@shreyas-a-s Yeah that is what I was missing hence I updated my comment :) |
Oh sorry, I think I was too fast there. :) Happy that I could be of help. |
@jrock2004 If that's it and there's nothing more with regards to this, it would be great if you could close the issue as completed so that the issue section stays pristine. ;-) |
@shreyas-a-s I am not the author so I cannot close |
@jrock2004 My bad, Oopsies. I thought you were the one. Then let's wait for THE actual One to return. |
E5108: Error executing lua ~/.config/nvim/lua/user/lspconfig.lua:36: attempt to inde x field 'inlay_hint' (a nil value) stack traceback: ~/.config/nvim/lua/user/lspconfig.lua:36: in function 'toggle_inlay_hints' [string ":lua"]:1: in main chunk
Here is 36
M.toggle_inlay_hints = function() local bufnr = vim.api.nvim_get_current_buf() vim.lsp.inlay_hint.enable(bufnr, not vim.lsp.inlay_hint.is_enabled(bufnr)) end
The text was updated successfully, but these errors were encountered: